# Copyright (c) 2017 by Michael Zahniser
# Copyright (c) 2018 by Zitchas
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.  See the GNU General Public License for more details.

mission "First Contact: Remnant"
	landing
	invisible
	source
		government "Remnant"
	on offer
		conversation
			`Although they are unusually tall and dark-skinned, the people here appear to be human. You wouldn't know it from the architecture, however: the buildings with their curved, twisted surfaces and ramifying arches look more alien than any human dwelling you have seen before.`
			`	Stranger still, no one is speaking: the usual background murmur of voices that you would associate with a spaceport is absent here. Instead, the locals are communicating in a rapid and graceful sign language, their hands tracing arcs through the air almost faster than your eyes can follow.`
			`	A few of them approach your ship and one of them greets you out loud, but instead of speaking he sings the words in a high, monotone chant: "Do you comprehend the ancestral tongue?"`
			choice
				`	(Say, "Yes, I do.")`
				`	(Try to chant, "Yes, I do.")`
					goto chant

			`	Their expressions are inscrutable; you aren't sure if they even understood you or not. They turn away from you for a second and converse in sign language.`
				goto blood
			label chant
			`	You sing, "Yes, I do," trying to match the leader's pitch. As you do so, several of them hum notes that harmonize with you.`
			label blood
			`	Two of them walk up to you. One is carrying a small device that looks like a handheld scanner. The other unwraps a small foil package, pulls out a lancet, and jabs his finger with it. A dark, red drop of blood wells up. He presses his finger onto a port on the scanner, then hands you another one of the packets. "We kindly request that you identify yourself," he chants. Several of the others hum along with him.`
			choice
				`	(Give them a blood sample.)`
					goto yes
				`	(Refuse to give them a sample.)`
					goto no
				`	(Run back to my ship and escape from here.)`

			`	You run into your airlock, slam the door shut, and blast off from the planet. Already, several of their ships are moving to intercept you. It seems that you are no longer welcome in this region of space...`
				launch

			label no
			`	You try to pull away, but the man's hand snakes out and grabs you by the wrist. Before you are even able to react he jabs your finger and shoves it onto the scanner. "You are in our space," he sings. "You will abide by our rules." No longer a monotone, his song is a jarring and atonal melody.`
			label yes
			`	Several of them gather around the one with the scanner as if waiting to see what the results will be. As you watch them you notice that all of them, even the women, have their hair cropped short. Also, their clothing looks like nothing that has ever been in fashion at any point in human history that you know of.`
			`	Finally the scanner beeps, and a yellow light flashes. You can almost feel the tension leaving the air as the crowd relaxes. "So you are pure. You are human," chants one of the women. "You are one of us."`
			choice
				`	"Of course I'm human. But what are human beings doing out here?"`
				`	"Who are you?"`

			`	Several of them burst into song, singing together in harmony, "We are the hidden ones. We are the Remnant. In time of great chaos to this place we came, lest all true-born humans be killed or enslaved, by those who evolved not, but unwisely were made."`
			`	As they continue to sing, you begin to piece together their story. They are the descendants of people who fled to this region of space through an unstable wormhole at the peak of the first Alpha War, which means they have been here for more than half a millennium. That doesn't explain why their culture is so radically different, though.`
			`	Eventually they invite you to a dinner. Their food has strange and complex flavors, not all of them pleasant, but you do your best to be polite and pretend to enjoy it all. After the meal, they entertain you by singing songs, some of which you recognize as classical Earth music. It appears that people in this culture use sign language for day to day communication, and use their voices only for making music.`
			`	When you return to your ship, you do a search on videos of historical dialects of human sign language. None of them bear even a passing resemblance to the language of these people who call themselves the Remnant.`
				decline
			
	on enter
		log "People" "Chilia" `Despite being quite young, Chilia is the Remnant Prefect in charge of Remnant military actions. He is highly respected among Remnant society.`
		"remnant chilia" ++
		conversation
			`As you break orbit and get ready to escape, you receive a message from <planet>. A chant comes from your speakers.`
			`	"My compatriots seem to have gotten off on the wrong foot. I am Prefect Chilia of the Remnant. We established ourselves here as a bastion of humanity to survive when the rest of human space was under threat by the Alphas.`
			`	"The blood test we requested is mandatory for all who come to our worlds. We will not tolerate the presence of anyone of Alpha heritage. Should you agree to the blood test and pass, we will allow you to visit our worlds in peace."`
			choice
				`	"Okay, I'll take the blood test."`
					goto accept
				`	"I'm not taking any blood test."`
			apply
				set "remnant: declined second chance"
				"reputation: Remnant" <?= -10
			`	"Then leave immediately or be eliminated. You will not be welcomed here again."`
				decline
			
			label accept
			apply
				set "remnant: accepted second chance"
			`	"Please return to <planet>. Be on your best behavior, as there will be no third chance."`
	
	to fail
		has "remnant: declined second chance"
	
	on fail
		log "Discovered a strange, isolated human community in an otherwise uninhabited region of space south of the Core. Angered them by refusing to submit to some sort of blood test."
		log "Factions" "Remnant" `The Remnant are a group of unusual-looking humans that live in a secluded section of the galaxy. It is unclear how long they have lived apart from the rest of humanity, but they have been free of human influences for long enough that their culture is wildly different from any found in human record. Their buildings seem to be alien in origin, and they communicate amongst each other primarily with sign language. When they do use their voices they sing or chant, rather than speak.`
	
	on decline
		event "ember waste label"
		log "Discovered a strange, isolated human community in an otherwise uninhabited region of space south of the Core. They call themselves the Remnant."
		log "Factions" "Remnant" `Half a millennium ago, during the Alpha Wars, a group of humans fleeing the conflict and looking for a safer place to live discovered a wormhole into a region of space known as the Ember Waste. They built settlements there, and chose to call themselves the Remnant. Although they no longer fear the Alphas as much as they once did, they still have not rejoined human society.`
			`Since their colonies were first formed, the Remnant's culture has changed drastically. They communicate in sign language, using their voices only for singing. Their food and architecture and much of their technology is strange, and much of it has been borrowed or stolen from nearby alien species.`
	
	npc
		government "Remnant"
		personality heroic coward disables plunders
		fleet "Large Remnant" 2
	
	to complete
		has "remnant: accepted second chance"
	
	on complete
		event "ember waste label"
		log "Discovered a strange, isolated human community in an otherwise uninhabited region of space south of the Core. They call themselves the Remnant."
		log "Factions" "Remnant" `Half a millennium ago, during the Alpha Wars, a group of humans fleeing the conflict and looking for a safer place to live discovered a wormhole into a region of space known as the Ember Waste. They built settlements there, and chose to call themselves the Remnant. Although they no longer fear the Alphas as much as they once did, they still have not rejoined human society.`
			`Since their colonies were first formed, the Remnant's culture has changed drastically. They communicate in sign language, using their voices only for singing. Their food and architecture and much of their technology is strange, and much of it has been borrowed or stolen from nearby alien species.`
		conversation
			`Your return trip is a bit more nerve-wracking. Unlike the previous time, your flight computer keeps blaring warnings that the ships escorting you are weapons-hot and locked on. As soon as you land, your ship is surrounded by soldiers with a variety of weapons, and the same man appears in the midst of them. As before, he pricks his finger, presses it to a spot on the device, then offers a still-sealed lancet to you. He begins chanting in a severe tone, "The first may be a misunderstanding, but now you know our law. Will you submit to a blood test, or be declared guilty once and for all?"`
			choice
				`(Provide the blood sample.)`
					goto comply
				`(Refuse and run for your ship.)`
				
			`	As you turn to start running back to your ship, the soldiers nearby begin raising their weapons and firing at you. As you feel your body begin to liquify under the assault of the strange energy bolts, the last thing you see is the look of pity, resignation, and confusion on the face of the man with the scanner. Probably wondering why you would decide to return if you were just going to run again. You suppose they'll never know...`
				die
			
			label comply
			`	Several of them gather around the one with the scanner as if waiting to see what the results will be. As you watch them you notice that all of them, even the women, have their hair cropped short. Also, their clothing looks like nothing that has ever been in fashion at any point in human history that you know of.`
			`	Finally the scanner beeps, and a yellow light flashes. You can almost feel the tension leaving the air as the crowd relaxes. "So you are pure. You are human," chants one of the women. "You are one of us."`
			choice
				`	"Of course I'm human. But what are human beings doing out here?"`
				`	"Who are you?"`

			`	Several of them burst into song, singing together in harmony, "We are the hidden ones. We are the Remnant. In time of great chaos to this place we came, lest all true-born humans be killed or enslaved, by those who evolved not, but unwisely were made."`
			`	As they continue to sing, you begin to piece together their story. They are the descendants of people who fled to this region of space through an unstable wormhole at the peak of the first Alpha War, which means they have been here for more than half a millennium. That doesn't explain why their culture is so radically different, though.`
			`	Eventually they invite you to a dinner. Their food has strange and complex flavors, not all of them pleasant, but you do your best to be polite and pretend to enjoy it all. After the meal, they entertain you by singing songs, some of which you recognize as classical Earth music. It appears that people in this culture use sign language for day to day communication, and use their voices only for making music.`
			`	When you return to your ship, you do a search on videos of historical dialects of human sign language. None of them bear even a passing resemblance to the language of these people who call themselves the Remnant.`

event "ember waste label"
	galaxy "label waste"
		sprite label/waste



# Compatibility patch for those who made contact with the Remnant prior to v0.9.9
mission "Remnant Blood Test Patch"
	landing
	invisible
	to offer
		has "event: ember waste label"
	on offer
		set "remnant blood test pure"
		fail



mission "lost in ember waste"
	landing
	invisible
	source
		government "Remnant"
	to offer
		has "remnant blood test pure"
		not "license: Remnant"
	on offer
		require "Quantum Keystone" 0
		require "Quantum Key Stone" 0
		require "Jump Drive" 0
		event "lost in ember waste" 14
		fail

event "lost in ember waste"



mission "Remnant: Lost in Ember Waste"
	landing
	invisible
	source
		government "Remnant"
	to offer
		has "event: lost in ember waste"
	on offer
		outfit "Quantum Key Stone" 1
		log `Became stuck in the Ember Waste, but was given a quantum key stone by an old woman who claims to have once been stuck in Republic space under similar circumstances.`
		conversation
			`You wander the <origin> spaceport feeling very lost in this strange region of space. Having flown around for a few weeks with no idea of how to get out, you wonder if you'll be stuck here forever.`
			`	You sit down on a bench and think about how you're going to get out of this situation. While you think, an old woman approaches you and signs something.`
			choice
				`	"Sorry, I don't understand."`
			`	The old woman chuckles to herself. "You seem lost," she says. You nod. To your surprise, she doesn't sing everything she says like the other Remnant.`
			`	"I'm guessing you don't know about the wormholes."`
			choice
				`	"The what?"`
				`	"I do, I just can't get through them."`
					goto know
			
			`	"There are red wormholes scattered around this region of space. You can only access them if you have a key stone on your ship, though. Don't ask me how it works, but that's how it is."`
				goto keystone
			
			label know
			`	"Get scammed out of your key stone?" she asks with another chuckle. "Or maybe your jump drive, and now you're stuck here? No problem."`
			
			label keystone
			`	The woman reaches into a bag that she has with her and hands you a quantum key stone. "Just put this on your ship and you can be on your way out of here."`
			choice
				`	"You're just giving this to me?"`
					goto thanks
				`	"What's the catch?"`
			`	She chuckles again. "No catch."`
			
			label thanks
			`	The woman sits down on the bench next to you. "I was once lost in Republic space for many years after losing my key stone. I know what it can be like to be away from your people for that long, so I'd rather not see you share the same fate."`
			choice
				`	"Thanks for the help. I'll go fit this on my ship."`
				`	"How'd you get to Republic space?"`
					goto republic
			
			`	You say goodbye to the woman and begin walking to your ship. "Safe travels, Captain," she sings with a big grin on her face as you walk away.`
				decline
			
			label republic
			`	"I was an adventurous spirit in my youth," she says. "One day I found my way out of the Ember Waste and back to what I learned was the rest of humanity. For years my people had hidden here believing the Alphas had killed everyone else, but I discovered that we had little to fear.`
			`	"I explored the Republic for many months, learning what had happened since the Alpha Wars, but when I attempted to return to the Ember Waste to tell my people, I found that my key stone had been stolen at some point during my journey. I had no way to return."`
			`	She lets out a long sigh. "I don't want to bore you with all the details, but I resigned myself to my new life. I met a man, had two daughters, but never lost hope of returning to my true home. One day, after my daughters had grown and my husband had passed in an accident, I decided to go on another adventure. I dusted off my old ship, and soon discovered the Hai."`
			branch hai
				has "First Contact: Hai: offered"
			choice
				`	"The who?"`
			`	"How you've become lost here without having discovered the Hai first is beyond me." She chuckles. "The Hai are a peaceful alien people north of humanity. Go looking for a purple wormhole in the uninhabited systems of the Far North. You may find your way there.`
				goto next
			
			label hai
			choice
				`	"You've met the Hai?"`
			`	"Well of course. How else would I have been able to return home?`
			
			label next
			`	"To my surprise, the Hai had a large number of quantum key stones." She pauses for a moment. "Might be a good idea for you to bring some of those Hai key stones here. Anyway, I was so thrilled that I didn't even ask any questions about how they had them. I bought one and flew as fast as I could back to the Ember Waste, and I've been here ever since."`
			choice
				`	"How long ago was that?"`
				`	"What about your daughters?"`
					goto daughters
			
			`	"Well I got lost when I was 17 and returned when I was 64, so perhaps some 130 years ago now that I returned." She chuckles at the surprised look on your face as you realize that she is nearly 200 years old. "Uncovering ancient alien technology is quite the blessing.`
				goto end
			
			label daughters
			`	"Oh, I only told them about deciding to travel the galaxy. Never told them about returning home. I made trips to see them every so often, but they both passed many decades ago now. It seems like the Republic can't quite get anyone to live past 130 years.`
			
			label end
			`	"I really must get going, now," she says. The woman gets up to leave, but before walking away she turns to you and sings, "Safe travels, Captain," with a big grin on her face. You say goodbye to her in return and part ways.`
				decline



mission "Remnant: Defense 1"
	name "Defend <planet>"
	description "Assist in defending <planet> from a Korath raid, then return to the planet."
	source "Caelian"
	to offer
		has "remnant blood test pure"
		not "Remnant defense delay"
	on offer
		conversation
			`In the relative quiet of this Remnant spaceport, it's unusually jarring when an alarm siren begins howling. All around you, people are rushing to get their ships into the air. Even though no one stops to explain to you what is happening, it's pretty clear that this is a planetary defense operation.`
			choice
				`	(Assist the defenders.)`
					launch
				`	(Stay here, and don't help them.)`
			`	You remain behind on the planet. You probably just missed out on a great opportunity to earn the gratitude of the Remnant.`
				defer
	on defer
		set "Remnant defense delay"
		event "remnant defense timer" 20
	npc
		government "Remnant"
		personality staying uninterested disables plunders
		fleet "Large Remnant"
	npc evade
		government "Korath"
		personality heroic plunders harvests target
		fleet "Korath Ember Waste Raid" 6
	on visit
		dialog "There are still Korath raiders circling overhead. You should take off and help the Remnant ships to fight them."
	on complete
		payment 500000

event "remnant defense timer"
	clear "Remnant defense delay"



mission "Remnant: Defense 2"
	landing
	name "Remnant bounty"
	description "A Korath ship is flying around Remnant territory. Hunt it down and destroy it, then return to <planet> for payment."
	source "Caelian"
	to offer
		has "Remnant: Defense 1: done"
	on offer
		conversation
			`The people here are grateful for your help in fighting off the Korath raid, and they offer you a payment of <payment>. They explain to you (in song, of course; the explanation takes the form of an epic ballad) that these raids have been taking place for nearly a century.`
			choice
				`	"Have you done anything to try to stop the Korath from raiding you?"`
				`	"What do you think the Korath are hoping to accomplish?"`
					goto motives
	
			`	"Of course not," chants one of them. "Why would we give up a good opportunity to plunder new technology?" His voice is such a perfect monotone that you can't tell whether the comment was meant facetiously or not.`
				goto next
	
			label motives
			`	"Perhaps they seek new territory, or perhaps they are just innately aggressive," chants one person.`
			`	"Of course," says another, "the fact that our ships dump their cargo when the raiders attack probably makes us a tempting target."`
			`	A third person explains, "We do that intentionally, to keep luring them back. The technology we gain when we manage to plunder one of their ships more than outweighs the cargo we lose."`
	
			label next
			`	While you're conversing with the group, a uniformed woman walks up and tells them something in sign language. They sign back and point to you. She says to you, "Thank you for your help. A Korath ship that came with the raiders and fled the battle is still lurking around our territory. Would you be willing to hunt it down?"`
			choice
				`	"Sure."`
				`	"Sorry, I don't have time to help you out."`
					decline

			`	"Thank you," she sings. "It keeps jumping between systems in our territory. Maybe its jump drive was damaged or something, and it can't escape. I'll spread news that you've taken on the bounty for hunting it, so others won't risk their lives fighting it."`
				accept
	npc kill
		government "Korath"
		personality coward target uninterested marked waiting
		system
			distance 1 2
		fleet
			names "korath"
			cargo 3
			variant
				"Korath World-Ship B (Crippled)"
		dialog "You have destroyed the Korath ship that was left over from the raid on <planet>. You can now return there to collect your payment."
	on visit
		dialog phrase "generic bounty hunting on visit"
	on complete
		payment 500000
		dialog `The same woman meets you when you land on <planet>. "Again, thank you," she says. "I will suggest to others that they might offer you similar bounty hunting jobs in the future." She pays you <payment>.`
		log "Factions" "Remnant" `Recently, Korath ships have begun raiding Remnant worlds. The Remnant have decided not to try to discourage these raids, because they are a perfect opportunity to steal jump drives and other valuable alien technology from the Korath.`



mission "Remnant: Bounty"
	job
	repeat
	name "Remnant bounty"
	description "Hunt down a crippled Korath ship that is lurking in Remnant territory, then return to <planet> to receive your payment of <payment>."
	source
		government "Remnant"
	to offer
		has "Remnant: Defense 2: done"
		random < 60
	npc kill
		government "Korath"
		personality coward target uninterested marked waiting
		system
			distance 1 2
		fleet
			names "korath"
			cargo 3
			variant
				"Korath Raider (Crippled)"
		dialog "You have destroyed the Korath ship. You can now return to <planet> to collect your payment."
	on visit
		dialog phrase "generic bounty hunting on visit"
	on complete
		payment 300000
		dialog "A Remnant military leader thanks you for hunting down the <npc>, and gives you the agreed-upon payment of <payment>."



mission "Remnant: Defense 3"
	landing
	name "Remnant surveillance"
	description "Travel to the <waypoints> system, destroy any Korath ships you find there, then deploy a Remnant surveillance satellite to give them advance warning of Korath raids in the future. Return to <planet> when you are done."
	source
		government "Remnant"
	to offer
		"Remnant: Bounty: done" >= 3
	cargo "surveillance equipment" 13
	waypoint "Parca"
	on offer
		conversation
			`A man approaches your ship soon after you collect your latest bounty, and sings, "You have been most helpful in fighting the Korath. Would you be willing to assist us in another way?"`
			choice
				`	"Sure, tell me more."`
				`	"Sorry, I'm not interested in helping you out anymore."`
					decline

			`	He explains that they hope to gain advance notice of future raids by setting up remote surveillance equipment in the system in the Ember Waste that is closest to Korath space. The equipment will communicate with the Remnant via something called an "entangled particle pair" that does not require a hyperspace relay network. Ironically, this is technology that the Remnant acquired by raiding the Korath decades ago.`
			`	"I will mark the target system on your map," he says, "and give you the equipment necessary to deploy the surveillance satellite. Please do not deploy it while any Korath ships are watching. Our scouts encountered Korath Raiders, but they have crippled them enough to where they should not be a problem."`
				accept
	on accept
		event "remnant: surveillance begin"
	npc kill
		government "Korath"
		personality heroic nemesis staying
		system "Parca"
		fleet
			names "korath"
			cargo 3
			variant
				"Korath Raider (Crippled)"
				"Korath Chaser" 2
		dialog "Now that you are alone, you are able to deploy the Remnant surveillance satellite unobserved. Time to report back to <planet>."
	on visit
		dialog `You have returned to <planet>, but you haven't deployed the surveillance satellite yet. Return to <waypoints> and make sure that all of the Korath there have been eliminated.`
	on complete
		event "remnant: surveillance end"
		payment 500000
		conversation
			`When you return to <planet>, the same Remnant man meets you and says that they have begun receiving data from the surveillance satellite that you deployed. "Thank you for your assistance," he sings. He pays you <payment>.`
			choice
				`	"You're welcome."`
					decline
				`	"You know, a great way to say 'thank you' would be to offer me a license to buy your technology."`

			`	He grins, very slightly. "That is not my decision alone to make," he says, "but I will put in a word for you and see what I can do."`

event "remnant: surveillance begin"
	system "Parca"
		remove fleet "Korath Ember Waste Raid"

event "remnant: surveillance end"
	system "Parca"
		add fleet "Korath Ember Waste Raid" 10000



conversation "remnant key stones"
	branch found
		has "Remnant: Found Keystones: offered"
	
	`As you are walking through the spaceport, a man comes up to you and introduces himself as the manager of the local outfitter. "Greetings, outsider," he says. "I have heard many good things about you and your assistance to our people. Would you be interested in going on a quest for me?"`
	choice
		`	"What kind of quest?"`
			goto quest
		`	"Sorry, I'm not interested."`

	`	"Please, I assure you, this quest will be very lucrative for you.`

	label quest
	`	"You may have noticed the red anomalies scattered within this region of space. What you may not have known is that these are wormholes, accessible only with the possession of a Quantum Key Stone. My people highly value these Key Stones because of this, but our mines produce very few of them." The manager shows you a Key Stone that he has with him.`
	scene "outfit/keystone"
	
	branch hai1
		has "First Contact: Hai: offered"
	
	`	"We have explored all of the Ember Waste, but have been unable to find any large concentrations of these stones."`
	`	"You seem to be able to easily explore outside of this region. If you manage to discover a source of Key Stones outside of the Ember Waste, would you please inform me of them?"`
	choice
		`	"If I find anything, I'll let you know."`
		`	"No thanks. This seems like a wild goose chase to me."`
			decline
	
	`	The outfitter manager thanks you. "We'll discuss payment once you return," he says.`
		accept
	
	label found
	`You find the outfitter manager and tell him that you have good news. "You found another world where the stones can be mined?" he asks.`
		goto exchange
	
	label hai1
	`	"I've seen that before," you say.`
	`	He looks at you with surprise. "You found another world where these stones can be mined?"`
	
	label exchange
	choice
		`	"Yes, in the territory of some aliens far to the north of here."`
			goto hai2
		`	"Yes, but I would prefer not to tell you where."`
	
	`	"That is understandable," he says. "I am a businessman and I understand how valuable certain trade secrets can be. But perhaps I can interest you in a mutually profitable endeavor?"`
		goto more
	
	label hai2
	`	"Intriguing," he sings. "Are they aware of how valuable these stones are?" You tell him about the Hai, that they are an old species and that to them the Key Stones are just good luck charms. "Perhaps they have forgotten the true use of the Stones," says the man. "This may give us an opportunity for a mutually profitable endeavor."`
	
	label more
	`	"Tell me more," you say.`
	`	He says, "If you could fetch me a large supply of these stones, say fifty of them, I would purchase them from you for a high enough price that you would earn a tidy profit. What do you say?"`
	choice
		`	"Sure, I would be glad to accept that deal."`
		`	"Sorry, I'm really not interested in doing business with you Remnant folks."`
			decline
	
	`	After a bit of haggling, he agrees to pay you six million credits in exchange for a cargo of fifty Hai "Keystones." Given how cheap they are to purchase in Hai space, you will be earning a very tidy profit on the deal.`
		accept



conversation "remnant key stones done"
	`You visit the local outfitter and tell the manager that you have brought a shipment of "Quantum Keystones" to sell to him. He is overjoyed, and gladly pays you six million credits for them. You can't help noticing that based on how much the Key Stones sell for here, he will be earning even more profit than you did, even though you did nearly all the work.`
	`	"You have made a valuable contribution to our people by doing this," he says. "These stones will allow more of our ships to explore the Ember Waste and discover the secrets that it holds."`



mission "Remnant: Key Stones (Pre-Hai) 1"
	name "Key Stones"
	description "The manager of the outfitter on <planet> is interested in finding alternative sources of Key Stones. The Remnant have explored the entire Ember Waste, so you will need to search elsewhere for these stones."
	source "Viminal"
	to offer
		not "Remnant: Key Stones (Hai): offered"
		not "Remnant: Key Stones: offered"
		not "First Contact: Hai: offered"
		or
			has "event: remnant: void sprite research"
			has "Remnant: Defense 3: done"
	on offer
		require "Quantum Keystone" 0
		conversation "remnant key stones"
		
	to complete
		has "Remnant: Found Keystones: offered"



mission "Remnant: Found Keystones"
	landing
	invisible
	source
		government "Hai"
	to offer
		has "Remnant: Key Stones (Pre-Hai) 1: active"
		has "First Contact: Hai: offered"
	on offer
		conversation
			`While exploring the Hai spaceport, you notice something interesting about some of the Hai ships. Many of them appear to be decorated with a stone that looks very similar to the Quantum Key Stones found in the Ember Waste. You ask a nearby Hai what they are, and she tells you that the stones are good luck charms that many Hai use on their ships that can be purchased from any Hai outfitter.`
			`	You should return to the Remnant outfitter manager to tell him about the stones in Hai space.`
				decline



mission "Remnant: Key Stones (Pre-Hai) 2"
	landing
	name "Key Stones"
	description "The manager of the outfitter on <planet> has offered to pay you six million credits in exchange for a shipment of fifty Quantum Keystones (which you will have to purchase from the Hai)."
	source "Viminal"
	to offer
		has "Remnant: Key Stones (Pre-Hai) 1: done"
	on offer
		conversation "remnant key stones"
		
	on visit
		dialog `You have returned to <planet>, but you don't have 50 "Quantum Keystones" to give to the outfitter. Buy the Keystones from the Hai before returning here.`
	on complete
		outfit "Quantum Keystone" -50
		payment 6000000
		conversation "remnant key stones done"
	
	
	
	
mission "Remnant: Key Stones (Hai)"
	name "Keystones"
	description "The manager of the outfitter on <planet> has offered to pay you six million credits in exchange for a shipment of fifty Quantum Keystones (which you will have to purchase from the Hai)."
	source "Viminal"
	to offer
		not "Remnant: Key Stones (Pre-Hai) 1: offered"
		not "Remnant: Key Stones: offered"
		has "First Contact: Hai: offered"
		or
			has "event: remnant: void sprite research"
			has "Remnant: Defense 3: done"
	on offer
		require "Quantum Keystone" 0
		conversation "remnant key stones"
			
	on visit
		dialog `You have returned to <planet>, but you don't have 50 "Quantum Keystones" to give to the outfitter. Buy the Keystones from the Hai before returning here.`
	on complete
		outfit "Quantum Keystone" -50
		payment 6000000
		conversation "remnant key stones done"
		


mission "Remnant: Key Stones"
	name "Keystones"
	description "The manager of the outfitter on <planet> has offered to pay you six million credits in exchange for a shipment of fifty Quantum Keystones (which you will have to purchase from the Hai)."
	source "Viminal"
	to offer
		has "remnant blood test pure"
		not "Remnant: Key Stones (Pre-Hai) 1: offered"
		not "Remnant: Key Stones (Hai): offered"
	on offer
		require "Quantum Keystone"
		conversation
			`As you are walking through the spaceport, a man comes up to you and introduces himself as the manager of the local outfitter. He says, "I could not help but notice that you have a Key Stone that looks different from the ones from our mines. You may have noticed the red anomalies scattered within this region of space. What you may not have known is that these are wormholes, accessible only with the possession of a Quantum Key Stone. My people highly value these Key Stones because of this, but our mines produce very few of them. Have you found another world where these stones can be mined?"`
			choice
				`	"Yes, in the territory of some aliens far to the north of here."`
					goto hai
				`	"Yes, but I would prefer not to tell you where."`
			
			`	"That is understandable," he says. "I am a businessman and I understand how valuable certain trade secrets can be. But perhaps I can interest you in a mutually profitable endeavor?"`
				goto more
			
			label hai
			`	"Intriguing," he sings. "Are they aware of how valuable these stones are?" You tell him about the Hai, that they are an old species and that to them the Key Stones are just good luck charms. "Perhaps they have forgotten the true use of the Stones," says the man. "This may give us an opportunity for a mutually profitable endeavor."`
			
			label more
			`	"Tell me more," you say.`
			`	He says, "If you could fetch me a large supply of these stones, say fifty of them, I would purchase them from you for a high enough price that you would earn a tidy profit. What do you say?"`
			choice
				`	"Sure, I would be glad to accept that deal."`
				`	"Sorry, I'm really not interested in doing business with you Remnant folks."`
					decline
			
			`	After a bit of haggling, he agrees to pay you six million credits in exchange for a cargo of fifty Hai "Keystones." Given how cheap they are to purchase in Hai space, you will be earning a very tidy profit on the deal.`
				accept
	
	on visit
		dialog `You have returned to <planet>, but you don't have 50 "Quantum Keystones" to give to the outfitter. Buy the Keystones from the Hai before returning here.`
	on complete
		outfit "Quantum Keystone" -50
		payment 6000000
		conversation "remnant key stones done"



mission "Remnant: Void Sprites 1"
	name "Space creatures"
	description "A man on the Remnant homeworld of <planet> asked you to collect data on some strange space creatures in the <waypoints> system, in another part of the Ember Waste."
	source "Aventine"
	waypoint "Nenia"
	cargo "scanning equipment" 8
	to offer
		has "remnant blood test pure"
	on offer
		conversation
			`As you explore the spaceport, you meet a Remnant man wearing some sort of optical prosthesis over his eyes, a visor with several tiny cameras mounted on it. "Ah," he sings, "the outsider. Human yet not of our culture, distinct from our mindset. That is useful. Would you be willing to invest in a research project?"`
			choice
				`	"Perhaps. Tell me more."`
				`	"Sorry, I'm not interested."`
					decline
			`	"Excellent," he sings. "Centuries ago, we discovered some space-dwelling organisms elsewhere in the Waste, and undertook to study them. Certain mistakes were made, certain underestimations, and we can no longer safely approach these organisms. Would you be willing to visit their home system and collect some sensor data? I call this an investment, because I cannot pay you until I publish the results of these studies."`
			choice
				`	"Yes, I'd be glad to."`
					goto end
				`	"Wait, that sounds super shady. Can you explain why you think it's safe for me to enter that star system, but not for you to do so?"`

			`	He says, "We studied the organisms and determined that they could not possibly be sentient. Therefore we saw no moral issues with collecting, well, ah... a sample. Unexpected things happened and certain grudges have been, ah, borne against Remnant ships for centuries as a result."`
			choice
				`	"Well, as long as you don't ask me to do something that will get me in similar trouble, I'll help you out."`
					goto end
				`	"Sorry, I'm not interested in helping you."`

			`	"Are you sure?" he chants. "We could learn some incredible things."`
			choice
				`	"No, I'm really not interested."`
					decline
				`	"Fine, tell me what you want me to do."`

			label end
			`	He sings, "Thank you. To begin with, all I ask is that you visit this star system and scan the creatures with certain special equipment that I will provide. Report back to me when you are done."`
			choice
				`	"How should I find you?"`
				`	"What is your name?"`
					goto name

			`	"Don't worry," he says, "I will find you. You are our only visitor from the outside in many decades; when you land here, it quickly becomes known."`
				accept
	
			label name
			`	He says, "My name is..." and then performs an elaborate gesture with his hands. "Don't worry if you can't perform my name," he says, "I will seek you out when you land. You won't need to ask around for me."`
				accept
	
	npc
		government "Indigenous Lifeform"
		personality timid mining harvests staying mute
		system "Nenia"
		fleet
			cargo 0
			variant
				"Void Sprite"
				"Void Sprite (Infant)" 3
	on enter "Nenia"
		dialog `There are indeed some strange space-faring life forms in this system. You collect measurements with the special sensors, and then prepare to return to <planet>.`
	on visit
		dialog `You have returned to <planet>, but you're missing something! Either you haven't visited <waypoints> to scan the void sprites, or your escort carrying the scanning equipment has not arrived in the system.`



mission "Remnant: Void Sprites 2"
	landing
	name "Scan the void sprites"
	description "Return to the <waypoints> system, and use an outfit scanner on one of each of the types of void sprites to see if you can tell how their propulsion works."
	source "Aventine"
	waypoint "Nenia"
	to offer
		has "Remnant: Void Sprites 1: done"
	on offer
		conversation
			`Sure enough, soon after you land the Remnant researcher with the optical prosthesis arrives at your ship. When he looks at the data that you collected using his special scanners, he is disappointed. He chants, "I had hoped the scanners would show us how the creatures are able to generate enough force to fly out of the gravity wells of their planets, but this tells me nothing. Perhaps it would help if you scan them more closely. Could you equip your ship with one of the scanners that are used to inspect the outfits that ships are carrying, and see if that scanner yields additional information?"`
			choice
				`	"Okay, I'll install an outfit scanner and see what it can tell me."`
					accept
				`	"Are you sure they won't interpret the scanner beam as an attack?"`

			`	"I doubt it," he says. "It is a very low-power beam. And after all, you were not attacked just now when you scanned them with my equipment."`
			choice
				`	"Okay, I'll install an outfit scanner and see what it can tell me."`
					accept
				`	"Wait, are you saying that you thought I might get attacked last time around, and you didn't tell me that?"`

			`	He says, "It was a small enough chance that I did not see a need to worry you."`
			choice
				`	"Sorry, I don't want to help with this project anymore."`
					decline
				`	"Okay, I'll install an outfit scanner and see what it can tell me."`
					accept
	npc "scan outfits"
		government "Indigenous Lifeform"
		personality timid mining harvests staying mute
		system "Nenia"
		fleet
			cargo 0
			variant
				"Void Sprite"
				"Void Sprite (Infant)"
	on accept
		event "remnant: nenia empty"
	on visit
		dialog `You land on <planet>, but you haven't scanned the void sprites in <waypoints>. Make sure you scan all the void sprites using an outfit scanner.`
	on complete
		event "remnant: nenia restored"

event "remnant: nenia empty"
	system "Nenia"
		remove fleet "Void Sprites"

event "remnant: nenia restored"
	system "Nenia"
		add fleet "Void Sprites" 500



mission "Remnant: Void Sprites 3"
	landing
	name "Visit void sprite planets"
	description `Purchase a "gascraft" ship from the Remnant world of Viminal, and use it to explore the two gas giants where the void sprites live. Then, return to <planet>.`
	source "Aventine"
	stopover "Viminal"
	stopover "Nasqueron"
	stopover "Slylandro"
	cargo "scanning equipment" 8
	blocked "The Remnant researcher has another job for you, but you're going to have to free up some cargo space in order to take it on."
	to offer
		has "Remnant: Void Sprites 2: done"
	on offer
		conversation
			`The Remnant researcher seems disappointed that an outfit scan didn't reveal any information about the void sprites, but he is also excited about a new idea for studying them. "I found that our university had several old mothballed ships suitable for exploring the upper atmosphere of a gas giant," he says. "Until I can publish my results I won't have the money to purchase one, but if you buy one you could land on the void sprite worlds and observe them in their natural habitat."`
			choice
				`	"How much will it cost to buy one?"`
				`	"Didn't you say before that anyone entering that system in a Remnant ship gets attacked?"`
					goto attack
				`	"Sorry, I'm not interested in helping you anymore."`
					decline

			`	"Only a few million credits," he says. "Don't worry, you can sell it back to them afterwards and recoup most of your investment. And, just think of how much you will be doing to advance the cause of science."`
				goto end

			label attack
			`	"Don't worry about it," he says. "These exploration craft are exceptionally fast and maneuverable. Even if you do provoke a negative reaction, you should be able to dodge any direct confrontation."`

			label end
			choice
				`	"Okay, I'll do it."`
				`	"Sorry, that's more than I'm willing to commit to."`
					decline

			`	"Excellent," he says. "This ship is an antique, so be careful with the shields. They are projected around the ship and are unable to adapt to new obstacles. Hard-shell shields, I believe they were called at the time of the Exodus, as opposed to the skin shields of today that fit close to the hull." He pauses and looks thoughtful, then continues. "Just make sure nothing valuable is near the hull when the shields activate - it will either be sheared in two or break the shields. And it is important to know that the pressure suit included with the ship is able to remotely activate and deactivate the shields and other ship systems. Good luck."`
				accept
	on accept
		event "remnant: gascraft"
	npc
		government " Drak "
		system "Nenia"
		personality staying heroic nemesis uninterested
		ship "Archon (Cloaked)" "Lifted Lorax"
	on stopover
		conversation
			`You have dodged the Archon and landed on the second of the two gas giants where the void sprites live. The hull of your tiny ship creaks and groans under the high atmospheric pressure, but seems to be holding together. Its sensors pick up flocks of void sprites floating between the planet's cloud layers, presumably feeding on airborne creatures too small to detect from this range.`
			`	You also observe some void sprites leaving the planet, soaring upward on thermal updrafts. As they rise, their bodies swell to several times their original size, like an aerostat balloon gaining altitude. But clearly they have another form of propulsion as well, something akin to the antigravity repulsors that human ships use to travel from a planet's surface into orbit.`
			`	After collecting some atmospheric samples for good measure, you prepare to return to <planet>. Hopefully the Archon will calm down once it sees that you have not attacked or disturbed the Sprites on either of these planets.`
	on visit
		dialog phrase "generic stopover on visit"
	on complete
		event "remnant: void sprite research" 20
		log "Factions" "Void Sprites" `The "void sprites" are space-dwelling lifeforms. They are apparently not sentient. They evolved in the atmosphere of a gas giant, but have some biological mechanism for altering or reflecting gravity that allows them to fly into outer space, in the same way that human ships use antigravity to escape a planet's gravity well. The void sprites are not particularly powerful or dangerous creatures, but they are guarded by a Drak Archon.`
		log "Factions" "Archons" `Archons are partly biological, but do not seem to be naturally evolved creatures. Some of their biological characteristics may have been based on the "void sprites" that inhabit the Ember Waste.`
		conversation
			`The Remnant researcher is ecstatic when he sees all the data you collected. "I will begin assembling this into a research paper immediately!" he sings. "It may be months before it is published, but when it is you will be named as a co-author, and I will share the payment with you."`
			choice
				`	"What do you know about the Archon that attacked me?"`
				`	"I'm glad I could help you out. I'll look forward to hearing from you."`
					decline

			`	He begins singing you a song about the Archons. The song says that the Archons are servants of the mysterious Drak, whom no one has seen but whom the Quarg claim to speak to and take orders from. "That's all our histories say," he sings, "but what interests me is the biological similarities between the Archons and the void sprites. We do not think the Archons are naturally evolved creatures. Perhaps their creators incorporated elements of void sprite biology into them when they were made. Or perhaps the Archons just feel an affinity with them because they are both space-faring organisms."`
			choice
				`	"Well, I'll look forward to hearing the results of your research when it is done."`
					decline
				`	"Do you think the Archons will continue to be angry at me?"`

			`	He says, "As long as you did not harm any of the void sprites, I doubt they will bear you a permanent grudge. The Archons are thinking creatures, after all; they cannot blame you for your curiosity."`
			`	You thank him for the information and tell him that you will look forward to reading the results of his study (and, getting paid for your help) once it is complete.`

event "remnant: gascraft"
	planet "Viminal"
		add shipyard "Remnant Gascraft"

government " Drak "
	"display name" "Drak"
	swizzle 5
	"player reputation" -1000
	"attitude toward"
		"Indigenous Lifeform" 1

event "remnant: void sprite research"



mission "Remnant: Technology Available"
	landing
	invisible
	source
		government "Remnant"
	to offer
		has "event: remnant: void sprite research"
		has "Remnant: Defense 3: done"
		or
			has "Remnant: Key Stones: done"
			has "Remnant: Key Stones (Hai): done"
			has "Remnant: Key Stones (Pre-Hai) 2: done"
			has "Remnant: Broken Jump Drive 2: done"
	on offer
		payment 2000000
		set "license: Remnant"
		log "The prefects have reached a consensus: now considered a valuable friend of the Remnant, and given permission to purchase their ships and technology."
		conversation
			`An elderly man approaches your ship and introduces himself as a local "prefect," presumably some sort of government position. In a song so elaborate that he must have composed and practiced it ahead of time, he informs you that a scientific study on the void sprites has just been published, and as the co-author you are entitled to a payment of two million credits, which he presents to you.`
			`	"When your name came up in the study," he says, "I asked around and discovered that you have helped us in other ways as well. The other prefects have reached a consensus that you should be considered a valuable friend of the Remnant, and shall henceforth be given permission to purchase our ships and technology."`
			choice
				`	"I'm honored. Thank you."`
					decline
				`	"Is there anything else I can do to assist your people?"`
			`	"Not that I am aware of right now," he says, "but we will call on you if a need ever arises."`
				decline



mission "Remnant: Learn Sign 1"
	name "Learn Remnant Sign"
	description `Travel to <destination> for more lessons on how to speak using Remnant sign language.`
	minor
	source "Caelian"
	destination "Aventine"
	repeat 3
	to offer
		has "remnant blood test pure"
		not "Remnant: Learn Sign 1: done"
		not "Remnant: Learn Sign 1: active"
		random < 30
	on offer
		conversation
			`As you make your way through the spaceport, you become increasingly aware of how quiet it is. Looking around, you note that it doesn't seem any less busy than usual, just that only a handful of people are paying attention to you. As a result, they have reverted to their normal gestures instead of singing. It feels oddly isolating, and eerie, to realize that there are hundreds of conversations going on around you, yet you can't understand a single one.`
			choice
				`	(Ask someone to teach you.)`
				`	(Ignore it.)`
					decline
					
			`	Looking around the spaceport, you eventually find someone at what looks like an information desk.`
			choice
				`	"I would like to learn your sign language."`
					goto words
				`	(Sing a short verse about not understanding people because your hands are still.)`
					goto song
			label words
			`	She looks at you with a confused expression, her hands making a few quick gestures. After a moment she points at the hand scanner embedded in the desk.`
				goto scan
			label song
			`	She looks surprised, but then recovers and sings a verse about how hands can learn, but must be cautious, and gestures at the hand scanner embedded in the desk.`
			label scan
			`	As you place your hand on the scanner, you feel a quick tingle as it scans your hand, then a pinprick as it extracts a drop of blood. The lady behind the desk looks at her screen. She nods, taps on the screen a few times, then retrieves a data pad from beneath the desk.`
			`	She hands the pad to you, and sings a brief verse about perseverance and hope.`
			`	Back on your ship you flip the pad on. The data pad appears to be loaded with a number of historic musicals and operas where the meaning of the lyrics has been replicated with gestures as subtitles. It is interspersed with what appear to be Remnant children's videos slowly explaining gestures and pausing to give you the opportunity to practice.`
			`	You spend a few hours going through the lessons. It takes a while to start vaguely understanding the signs, but you eventually learn how to sign a number of basic phrases. Eventually, the pad goes black and a note pops up on the screen informing you that additional lessons are available from the director's desk on Aventine.`
				accept

mission "Remnant: Learn Sign 2"
	landing
	name "Learn Remnant Sign"
	description `Travel to <destination> for more lessons on how to speak using Remnant sign language.`
	source "Aventine"
	destination "Viminal"
	to offer
		has "Remnant: Learn Sign 1: done"
	on offer
		conversation
			`While searching for the director's desk in the Aventine spaceport, you are very conscious of all the conversations going on around you. You manage to catch a word here and there, but not enough to understand the conversations. With some trouble, you ask for directions using what you have learned, and you arrive at a similar desk in a busy plaza.`
			`	It looks like the person behind the desk has been expecting you. They gesture very slowly, asking how your lessons are going using very basic signs and songs. After a few minutes of conversation, they ask you to place your hand on the scanner, which takes a sample of your blood, and then give you a data chip with more lessons.`
			`	You return to your ship and begin going through the lessons. These lessons focus more on purely conversing through sign with almost no singing.`
			`	Just as last time, the screen goes black and reveals a note saying that there will be a final package of lessons waiting for you on Viminal.`
				accept

	on complete
		event "remnant: sign studies complete" 60
		log "Have been introduced to the basics of the Remnant sign language. Will need to practice using the video lessons for some time in order to fully understand Remnant sign language."
		conversation
			`As soon as you land, you look around for someone to ask directions from. Approaching a dockhand who doesn't appear to be busy, you carefully sign, "Can you direct me to the port director?" He looks at you curiously for a moment and replies with exaggerated slowness. You thank him and head towards the spaceport following his directions.`
			`	Once again the director seems to be expecting you, and has a simple conversation with you about how the flight was and how your lessons are progressing. You manage to convey that you have learned a bit, and he gives you a few tips on your rehearsed phrases before directing you to place your hand on the scanner. Once again, the scanner takes a sample of your blood.`
			choice
				`	(Sign asking what the scanners are for.)`
				`	(Sing a verse about your confusion of the hand scanners.)`
			`	The man begins to sign, but then realizes that you don't understand much of what he is signing, so he switches to singing. "Long ago it was decided that being infiltrated by Alpha agents was a big risk, and we couldn't depend on our interstellar network to remain secure. So we implemented a policy where the first time a Remnant is granted formal access to a new planet their purity and identity is verified. Thus even if someone hacked our networks to give themselves a clean identity, they would still be caught when they started working on a new planet. We also don't broadcast that requirement on our networks, simply enforce it locally. It isn't foolproof, but it adds an additional layer of safety."`
			`	You thank the man for explaining the scanners to you and accept the next set of lessons.`
			`	You spend a few hours viewing some of the lessons, one of which involves watching an ancient show about a merchant captain making his way through the galaxy with an unlikely crew, re-enacted by a cast of Remnant who sing and sign their way through the dialogs with exaggerated simplicity. It is oddly familiar, but you can't quite place it. You notice that it seems to have a lot of subtext about the dangers of manipulation and government secrecy, especially surrounding genetics.`
			`	Skimming through the rest of the lessons, you notice that there is a lot more here than the last two times. It may take some time to get through it all, but you should be fairly fluent if you practice over a couple of months.`

event "remnant: sign studies complete"



mission "Remnant: Learn Sign Follow Up"
	invisible
	source 
		government "Remnant"
	to offer
		has "event: remnant: sign studies complete"
	on offer
		log "Have achieved a degree of fluency in the Remnant sign language sufficient for general conversation."
		conversation
			`As you make your way into the spaceport, it occurs to you that one of the information directors who gave you the instructional videos might appreciate how much you have learned over the past months of practice. You stretch your fingers and stop by the desk where you are able to have a simple conversation with the information director.`
			`	"Congratulations, Captain <last>!" the director signs. "Your fluency is good enough that even those unwilling to sing with a stranger should be comfortable working with you. At this rate you will be one of us in more ways than just by blood. I look forward to seeing what results from your work with us." The director is interrupted by the arrival of other Remnant asking for something and bids you farewell with an apologetic gesture.`
				decline



mission "Remnant: Tech Retrieval"
	name "Remnant Human Tech Retrieval"
	description "The Remnant are interested in learning what advances humanity has made over the past centuries. Bring them samples of advanced technology."
	source "Viminal"
	to offer
		has "Remnant: Technology Available: offered"
		random < 30
	on offer
		"remnant met taely" ++
		conversation
			`As you enter the spaceport, you notice someone across the plaza appears to have been waiting for you. A tall, solidly built woman in short-sleeved coveralls stands up from where she was sitting near the information desk. With a few quick gestures at the person behind the counter, she heads towards you with a confident stride. As she approaches, you note that the crowds of people moving around the plaza seem to be staying out of her way as if she were someone important. In contrast, she reminds you of the mechanics who maintained the textile factories back on New Boston. In particular, the tools at her belt and the wear marks on her clothing suggest someone who is more comfortable inside a ship access duct than behind a desk.`
			`	Before you can decide if you want to avoid this person or not, she is standing in front of you, clearing her throat. "You are captain <first> <last> of the <ship>?" She asks in a lyrical chant.`
			choice
				`	"That's me."`
					goto admit
				`	"I don't know who that is."`
			`	She looks at you with an inscrutable expression for a moment. "Trying to be inconspicuous is admirable. Being oblivious to the fact that you stand out like a star in empty space is not."`
			label admit
			`	"I have an opportunity for you, if you are interested in being helpful to the Remnant." When you express your interest she leads you over to a balcony overlooking the primary shipyards. As she leans on the railing a cold breeze makes you shiver, but she seems oblivious to it. "I am known as Taely. As a prefect among the Remnant, I am responsible for this." She gestures at the shipyards, where you can see a myriad of the Remnant's alien-looking ships in various stages of construction or repair. "The ships we have serve us well, but they are old designs. Only the Gull is comparatively new. We need new ideas, new inspiration." She pauses, focusing briefly on a small bay where several people appear to be pulling what looks like a supercapacitor out of a gascraft.`
			choice
				`	"So, what are you asking?"`
					goto request
				`	"What are they doing?"`
			`	"Oh, those are apprentices," she trills with a touch of amusement. "They need to learn how to handle unusual tech. One of the first steps is to deal with old tech. Like salvaging an obsolete supercapacitor out of that gascraft so it can be reprocessed into something useful, and replacing it with newer integrated energy storage." She glances at you in amusement. "You've flown the gascraft, you know how old that ship is: primitive energy systems, antique 'hard-shell' shields that have to be manually raised and lowered..." She trails off into momentary silence. "Be glad that you got one that had already been refurbished prior to your visit to Nenia. At least it had modern engines and an updated sensor array."`
			label request
			`	"To the point," her tone shifts to a more martial cadence. "We want to know how humanity has advanced in the past five and a half centuries. If you found us, I am sure it is only a matter of time until the Alphas, their servants, or others intent on galactic domination discover us. We need to know what sort of weapons they will be wielding, how their ships will be protected, and how fast they can travel in deep space."`
			choice
				`	"Okay, I will see what I can find."`
					goto find
				`	"Could you elaborate on 'how fast they can travel in deep space'?"`
				`	"No, I don't want to get involved in this."`
					goto nothelp
			`	She considers her thoughts briefly, then chants, "How fast a ship can move through an area of deep space basically depends on how fast they can collect fuel. Ramscoops were common at the time of the exodus, and if humanity has developed better ramscoops or other means of generating fuel, these would significantly improve their speed at exploring or crossing large volumes of space."`
			choice
				`	"Okay, I will see what I can find."`
				`	"No, I don't want to get involved in this."`
					goto nothelp
			label find
			`	Taely nods "I will look forward to seeing what you find. In the meantime, I should get back to work." With that, she swings over the railing and climbs quickly down the wall in the direction of the shipyard, seemingly unconcerned about the height.`
				accept
			label nothelp
			`	Taely looks at you with a blank expression, then chants in a monotone voice "If that is your choice, you are unlikely to find much of interest to do among us." With that, she vaults over the edge of the railing and drops from view. As you quickly peer over the railing, you discover that she had must have caught a handhold somehow, as she is rapidly moving down the wall in a controlled fashion with ease of a spider.`
				decline
	to complete
		or
			has "Remnant: Heavy Laser: done"
			has "Remnant: Catalytic Ramscoop: done"
			has "Remnant: Plasma Cannon: done"
			has "Remnant: Electron Beam: done"
			has "Remnant: D94-YV Shield Generator: done"
			has "Remnant: S-970 Regenerator: done"



mission "Remnant: Heavy Laser"
	name "Retrieve Heavy Lasers"
	description "A Remnant engineer has offered to pay you <payment> in return for delivering two heavy lasers to <planet> for them to study."
	source "Viminal"
	destination
		government "Remnant"
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "Heavy Laser"
		conversation
			`You remember that Taely was interested in seeing examples of technology from human space. Would you like to show her your heavy laser?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely just finishing the installation of a thrasher cannon in a Starling. "Greetings, <first>. I'll be down in a minute." She does a few more things inside a panel, reseals the hatch, and slides down a fin to land next to you. "So, do you have something for me?"`
				goto next
			label familiar
			`	You recall that Taely is responsible for the shipyards, so you head straight there and ask the nearest mechanic. They direct you to a large hangar tucked into a cliff face, where you find her working at a terminal filled with schematics. Behind her, the room fades quickly into darkness where you can faintly make out what appears to be a large tank and a lot of whirring machinery. As you approach she looks up from her work and turns to face you. "Ah, you have returned. Do you have something new for me?"`
			label next
			`	You lead her back to your ship, where you show her the heavy laser. "A laser cannon?" she asks. "Our records indicate that humanity had primitive laser technology at the time of the Exodus, but nothing that would be considered useful as weapons." She pauses to look down at her scanner. "And yet my scans indicate that they are capable of significant power output." She pauses for a moment before continuing, "These could be quite useful to examine more thoroughly. Please deliver two of these heavy lasers to a research team on <planet>."`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two heavy lasers that Taely requested. Go buy two heavy lasers before returning.`
	on complete
		outfit "Heavy Laser" -2
		payment 870000
		"remnant met taely" ++
		conversation
			`As you land on a pad adjacent to the research center, a group of researchers mount some kind of weapon on a platform aimed down a firing range. The researchers retreat behind a thick barrier and press a button to activate the weapon. A flash of light erupts from the muzzle as the target downrange is cut in half. The barrel of the weapon raises into the air, and the researchers rush out onto the range with tools and devices to inspect the damage. Noticing your arrival, one of the researchers veers off and heads towards you. "So, you are the one with the samples of humanity's laser weapons?" chants the researcher. "Always interesting to see new things." He turns and waves at a Remnant standing near the edge of the landing pad with a camel hitched to a wagon.`
			`	The researchers quickly unload the heavy lasers from your ship, and hand you a credstick with <payment>. "Thank you for bringing us something new to examine. We appreciate the breath of fresh air." With that, they quickly head off into a nearby lab, escorting their cargo of weaponry on the oddly archaic transportation.`



mission "Remnant: Plasma Cannon"
	name "Retrieve Plasma Cannons"
	description "A Remnant engineer has offered to pay you <payment> in exchange for delivering two plasma cannons to a team on <planet>."
	source "Viminal"
	destination
		government "Remnant"
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "Plasma Cannon"
		conversation
			`You recall that Taely was interested in examining examples of technology from ancestral space. Would you like to show her the plasma cannons you retrieved?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely just finishing the installation of a thrasher cannon in a Starling. "Greetings, <first>. I will be down in a minute." She does a few more things inside a panel, reseals the hatch, and slides down a fin to land next to you. "So, do you have something for me?"`
				goto next
			label familiar
			`	Aware that Taely's main area of responsibility is in the shipyards, you head straight there and have almost arrived when you are approached by another Remnant who introduces herself as one of Taely's aides. "Greetings, Captain" she trills. "Our scans picked up indications of uncatalogued human weaponry. Were you bringing it to show us?"`
			label next
			`	You lead her back to your ship, where you show her the plasma cannon. "I have never seen weapons designed to handle such a high heat output! Is this some kind of plasma based weapon?" she asks, gesturing at a cannon. You nod, and she continues, "Intriguing. We have noticed that the Korath ships seem to run particularly hot, and have speculated that overheating them might be an effective means of disabling them. I would enjoy researching these a bit more. If you could deliver two to <planet> for us you would be well compensated."`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two plasma cannons that Taely requested. Go buy two plasma cannons before returning.`
	on complete
		outfit "Plasma Cannon" -2
		payment 1130000
		"remnant met taely" ++
		conversation
			`As the <ship> settles onto the pad closest to the research facility, you can see a weapons specialist checking over a large cannon on a platform beneath a nearby Albatross. When he sees you starting to unload the two plasma cannons, he snaps the casing closed and gestures to someone out of sight. Within moments both him and an empty flatbed are there to pick up the weapons.`
			`	"Thank you for your help," he says. "Our Inhibitors provide us with something of a mobility advantage against the Korath, but they aren't particularly effective at disabling them. These plasma cannons will open new avenues of research for us." He pauses, then continues. "I also included a bonus for you. It is a 'finder's fee,' as we always appreciate new tech."`
			branch wave
				has "Remnant: Learn Sign 1: done"
			`	The weapons technician finishes strapping down the plasma cannons and makes a gesture towards you, then heads off toward the lab.`
				goto end
			label wave
			`	The weapons technician finishes strapping down the plasma cannons and makes a gesture that you recognize as "farewell," then heads off toward the lab.`
			label end
			`	As you watch the Remnant heading off with their new weapons to study, you cannot help but wonder what will be the result of it.`



mission "Remnant: Catalytic Ramscoop"
	name "Retrieve Catalytic Ramscoops"
	description "A Remnant engineer has offered you <payment> for delivering two catalytic ramscoops to a lab on <planet>."
	source "Viminal"
	destination
		government "Remnant"
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "Catalytic Ramscoop"
		conversation
			`You recall that Taely was interested in seeing examples of new human technology, and the catalytic ramscoop definitely fits the criteria. Would you like to show her?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely calibrating an Inhibitor Cannon on an Albatross. "Greetings, <first>. I am just finishing these calibrations." She does a few more things inside the casing, reseals the hatch, and drops to the ground on a tether. "So, did you recover something?"`
				goto next
			label familiar
			`	Remembering that she spends most of her time in the shipyard, you head straight there and almost immediately are intercepted by another Remnant who introduces herself as one of Taely's assistants. "Good day, Captain" she chants. "Our scans picked up a new form of ramscoop onboard your ship. Have you brought it for us to look at?"`
			label next
			`	You lead her back to your ship, where you show her the catalytic ramscoop. "Interesting. This is a new design?" She asks, gesturing at the ramscoop. You nod, and she continues, "Even if it does not perform well, new perspectives on the problem could be valuable. There is a research team on <planet> that is currently working on new ramscoop designs. If you could deliver two catalytic ramscoops to them we could offer you <payment>."`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two catalytic ramscoops that Taely requested. Go buy two catalytic ramscoops before returning.`
	on complete
		outfit "Catalytic Ramscoop" -2
		payment 1390000
		"remnant met taely" ++
		conversation
			`As the <ship> settles onto the pad closest to the research laboratory, you can see several people exiting an adjacent hangar with a trailer pulled by a camel. They quickly approach your landing pad and wait for you to complete your shutdown routines before boarding and starting to unload the ramscoops. Once they are done one of the comes up to you and hands you your payment of <payment>. "Thank you for the delivery, Captain. We are looking forward to seeing what they have done differently."`



mission "Remnant: Electron Beam"
	name "Retrieve Electron Beams for the Remnant"
	description "A Remnant engineer has offered you <payment> for delivering two electron beams to a testing range on <planet>."
	source "Viminal"
	destination
		government "Remnant"
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "Electron Beam"
		conversation
			`You recall that Taely was interested in seeing examples of new human technology, and the electron beam certainly fits the criteria. Would you like to show her?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely closing up the panel on a thrasher turret. "Greetings, <first>. You have good timing: I was just finishing." She reseals the hatch, and drops to the ground on a tether. "So, did you recover something?"`
				goto next
			label familiar
			`	Given what you know about Taely, you decide to skip the spaceport proper and head for the shipyard. After a frustrating half hour spent wandering around trying to find her, you finally encounter a helpful weapons tech who says they can check the weapon on Taely's behalf.`
			label next
			`	You accompany her back to your ship, where she examines the electron beam. "This could be useful. Focusing energy into continuous beams has been a popular idea for centuries. It is very useful to know that they have finally managed to make it into an effective weapon.`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two electron beams that Taely requested. Go buy two electron beams before returning.`
	on complete
		outfit "Electron Beam" -2
		payment 1090000
		"remnant met taely" ++
		conversation
			`On <planet> you follow the landing instructions to arrive at a pad set next to a small complex of testing ranges and workshops. A group of technicians is just finishing the disassembly of a weapon from the test stand when you settle onto the stand, and a few minutes later they arrive to unload the electron beams from your ship. They move eagerly to secure the new weapons to their flatbed and quickly hand you your payment of <payment> before vanishing into the lab.`



mission "Remnant: D94-YV Shield Generator"
	name "Retrieve D94-YV Shield Generators"
	description "A Remnant engineer has offered you <payment> for delivering two D94-YV Shield Generators to a research facility on <planet>."
	source "Viminal"
	destination
		government "Remnant"
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "D94-YV Shield Generator"
		conversation
			`You know that Taely was interested in seeing examples of recently developed human technology, and the D94-YV Shield Generator probably fits the criteria. Would you like to show her?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely applying some kind of material over a hole in a hull. "Greetings, <first>. What brings you here today?" She reseals the hatch, and drops to the ground on a tether. "Did you bring us something?"`
				goto next
			label familiar
			`	You decide that you are more likely to find her in the shipyard, so you skip the starport and head out among the ships. As you search through the yard you are soon approached by another engineer. "Well met, Captain. Taely said you may be bringing back samples of new technology from ancestral space. Do you have something to show us?`
			label next
			`	You nod in the affirmative and lead her back to your ship, where she examines the D94-YV Shield Generator. "It certainly looks impressive," she chants as she paces around the massive piece of equipment. "It will be valuable to see what our enemies might be shielded with, and maybe something we can learn from it too." She comes to a stop in front of you. "If you could deliver two of these to a lab on <planet> we could compensate you with <payment>.`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two D94-YV Shield Generators that Taely requested. Go buy the two shield generators before returning.`
	on complete
		outfit "D94-YV Shield Generator" -2
		payment 1150000
		"remnant met taely" ++
		conversation
			`On <planet> you follow the landing instructions to arrive at a pad set next to a large warehouse. As you complete your shutdown routine the doors slide open and a large crawler emerges, accompanied by several Remnant. They carefully unload the D94-YV Shield Generators and strap them down. As they start heading back to the warehouse one of them comes over to hand you <payment>. "Thank you for the delivery. Our team is eager to see what humanity has achieved in these past centuries."`



mission "Remnant: S-970 Regenerator"
	name "Retrieve S-970 Regenerators"
	description "A Remnant engineer has offered you <payment> for delivering two S-970 Regenerators to an impact testing facility on <planet>."
	source "Viminal"
	destination
		government "Remnant"
	to offer
		or
			has "Remnant: Tech Retrieval: active"
			has "Remnant: Tech Retrieval: done"
	on offer
		require "S-970 Regenerator"
		conversation
			`You recall that Taely was interested in seeing instances of new human technology, and the S-970 Regenerator is definitely a recent development. Would you like to show her?`
			choice
				`	(Not now.)`
					defer
				`	(Yes.)`
			branch familiar
				has "Remnant: Tech Retrieval: done"
			`	After asking a few people, you finally get directed to a bay in the shipyard where you find Taely adjusting something on the hull that you can't quite see. "Greetings, <first>. What brings you here today?" She taps something, then hangs her tools on her belt and drops to the ground on a tether. "Did you bring us something?"`
				goto next
			label familiar
			`	Taely seems like the sort of person who spends most of their time working directly on ships, so finding people repairing ships seems the most likely place to find her. As you enter the maintenance section, you spot an engineer waiting for you. She quickly introduces herself as an engineer who works with Taely. "She was not able to be here, so she sent me to see what you have brought" chants the engineer.`
			label next
			`	You nod in the agreement and lead her back to your ship, where she does a cursory scan of the S-970 Regenerator. "Hmm," she murmurs as she peers at the readings on her instrument as she waves it up and down the regenerator. "This looks like they may have found a few techniques that would be beneficial for us to study. If you could deliver two of these to a lab on <planet> we could compensate you with <payment>.`
				accept
	on visit
		dialog `You have returned to <planet>, but you don't have the two S-970 Regenerator that Taely requested. Go buy the two shield regenerators before returning.`
	on complete
		outfit "S-970 Regenerator" -2
		payment 2350000
		"remnant met taely" ++
		conversation
			`On <planet> you follow the landing instructions to arrive at a pad set next to a substantial facility with a large equipment bay. As you complete your shutdown routine the doors to the bay slide open and a crawler emerges, accompanied by several Remnant. They carefully unload the S-970 Regenerators and strap them down. As they start heading back into the bay, one of them comes over to hand you <payment>. "Thank you for the new outfits to study. Our team is quite interested to see what humanity has achieved since our exodus."`



mission "Remnant: taely intro log"
	invisible
	source
		government "Remnant"
	to offer
		"remnant met taely" >= 1
	on offer
		log "People" "Taely" `As an engineering prefect, Taely is the foremost authority among the Remnant on salvaged technology and a senior leader in their reverse engineering program.`
		fail



mission "Remnant: Return the Samples"
	name "Return the Samples"
	description "A researcher on <planet> has asked you to return void sprite eggs to Nasqueron that the Remnant stole many years ago."
	source "Aventine"
	stopover "Nasqueron"
	to offer
		has "Remnant: Technology Available: offered"
		random < 50
	on offer
		conversation
			`As you are walking through the spaceport, the researcher you previously assisted with the studies on the void sprites approaches you in a hustle. "We have made some new discoveries!" he exclaims in a trill. "Some of the samples that we took all those years ago are actually eggs of some kind. So the Archon must view our previous research as being disruptive to the void sprites' lifecycles.`
			`	"We have been storing these eggs in a cryogenic stasis tank, so they should still be viable and intact. Well, most of them, anyway." His notes trail off on a mournful tone.`
			`	"Could you return some of them to Nasqueron? According to our logs, they were found floating in the lower levels of the atmosphere, where their natural buoyancy should keep them afloat."`
			choice
				`	"Sure, I would be glad to return them."`
				`	"Sorry, I'm really not interested in dodging the Archon again."`
					decline

			`	"Thank you. Since we are continuing to work together, I would like to introduce myself again." He takes a breath, thinks for a second, and speaks a short verse about plumage with a complex chord that sounds at once grandiose and self-deprecating. The best you can make out is that his name is "Plume."`
			`	"Just remember: you will need to use a gascraft to make this delivery. If you don't still have one, there are a few in storage in Viminal." He taps on his commlink, and an assistant emerges from a nearby building with a flatbed truck. Onboard is a large collection of cocoon-like pods cradling large eggs, as well as a big spacesuit that looks more reminiscent of an ancient deep-sea diving suit than anything carried on a modern ship. "Now, remember, you need to remove the eggs from the cocoons and release them gently. Please make sure they don't hit anything on the way out."`
				accept
	npc
		government " Drak "
		system "Nenia"
		personality staying heroic nemesis uninterested
		ship "Archon (Cloaked)" "Lifted Lorax"
	on accept
		log "People" "Plume" `A Remnant researcher specializing in xenobiology, Plume is at the forefront of recent efforts to restart research on the void sprites and a leading expert in non-carbon based lifeforms.`
	on stopover
		conversation
			`Once again you have successfully dodged the Archon to land on Nasqueron. Somehow, knowing it was going to be there was both better and worse than the surprise of the first time.`
			`	As the <ship> sinks through the cloud layers, you gently activate the repulsors to slow your descent to avoid startling the void sprites. A few nearby sprites descend with you, seeming to match your velocity. You slow down as you reach the altitude listed in the log of where the eggs are to be released.`
			`	Setting the ship on auto-pilot, you walk to the back and struggle into the pressure suit. Readying the eggs in the cargo hold, you equalize pressure in the main cargo hold to the swirling clouds outside, and open the bay doors. As predicted, at this pressure level, the eggs are almost weightless, and are fairly easy to carry to the door of the ship and release.`	
			`	By the time you finish releasing the eggs back into the clouds, several void sprites have converged on your ship and appear to be herding the eggs away from you with gentle buffets of their wings. You take a moment to appreciate the alien beauty of these creatures before closing the hatch and purging the ship with fresh air.`
	on visit
		dialog phrase "generic stopover on visit"
	on complete
		conversation
			`Back on the ground, you report on how the release went. The researcher is pleased to hear that the void sprites responded to their presence. "We will give them a few weeks, then try sending another ship to monitor them. Hopefully the Archon will be pacified by this. Meet me in the alien environments lab just off the spaceport if you are interested in pursuing this."`



mission "Remnant: Return the Samples 2"
	name "Return the Samples"
	description "Plume has asked you to return more stolen eggs, this time to Slylandro. Then return to <planet> with footage of the void sprites."
	source "Aventine"
	stopover "Slylandro"
	to offer
		has "Remnant: Return the Samples: done"
	on offer
		conversation
			`Following Plume's directions, you find a lab tucked behind the main area of the spaceport, where a short walkway leads into an underground structure. Stepping inside the door you note a rack of camouflage netting positioned easily at hand. Given what you have learned of their history, it is probably a last-ditch preparation in case they need to hide the entrance from a raid.`
			`	The lab itself is a microcosm of Remnant development. The structure appears to be some strange semi-organic material, and you can see an eclectic mix of familiar and unfamiliar shapes cluttering the tables. If you had to guess, you would say that this lab was the result of several different families of technology, only one of which was human.`
			`	Plume and several other Remnant are at the back of the room inspecting a bunch of cocoon-like containers, similar to the ones that carried the last batch of eggs back to Nasqueron. After checking a screen he looks up and seems momentarily startled to see you.`
			`	"Ah, <first>! You are just in time," Plume chants quickly, his hands unconsciously dancing in a quick series of gestures. "These eggs are ready to be delivered, this time to Slylandro. Could you drop them off like you did before?"`
			choice
				`	"Yes, I would be happy to bring them home."`
				`	"Sorry, I'm really not interested in risking the Archon a third time."`
					decline

			`	"Thank you. Like last time, we can't pay you for this. But we are still hopeful that the Archon might let us resume our studies." He follows you out to the <ship> and helps you load the cocoons holding the eggs. Just before parting ways he asks, "Oh, could you record the void sprites this time? We would like to see the behaviors you mentioned last time."`
				accept
	npc
		government "Drak"
		system "Nenia"
		personality staying heroic nemesis uninterested
		ship "Archon" "Lifted Lorax"
	on stopover
		conversation
			`As you approach Slylandro you watch the Archon like a hawk, but this time it doesn't attempt to drive you off with tridents of white energy. Cautiously you make your way to Slylandro and begin your descent.`
			`	As the <ship> sinks through the cloud layers, you notice the void sprites seem to be tailing you. A few drop past you with startling speed, only to reappear from below as you approach the designated altitude. At the last minute you remember Plume's request to record them, and hit the switch to activate the recorder for the exterior cameras.`
			`	Setting the ship on auto-pilot, you head back and suit up in the bulky pressure suit once again. Readying the eggs in the cargo hold, you equalize pressure and open the bay doors. As before, the eggs are already floating as you open the cocoons and gently carry them to the door.`
			`	Almost as soon as you release the first egg, a void sprite is there, brushing against the ship to scoop the egg away into the swirling mists. By the time you return with the next one, another sprite is already waiting at the door, undulating in the eerie light. By the time the last egg is released you can see dozens of the strange creatures swarming around the collection of eggs. It occurs to you that very few humans would ever have the chance to see anything like this.`
			`	After taking a moment to enjoy the view, you shut the door as gently as you can, purge the ship with fresh air, and begin the journey back to Aventine.`
	on visit
		dialog phrase "generic stopover on visit"
	on complete
		"reputation: Drak" += 1
		event "remnant: return the samples timer" 2 4
		conversation
			`Back on Aventine, you share the recording of the void sprite's behavior with Plume. "These Sprites demonstrate considerably more communication than we originally thought. And obviously they must have communicated what you did on Nasqueron. Interesting..." Plume's excited staccato exclamations trail off as he begins to make notes on a data pad he has on hand. "Thank you for your help, we will let you know what we find out."`



event "remnant: return the samples timer"


# Compatibility patch for those who completed Return the Samples 2 before 0.9.11, where it did not have the timer.
mission "Remnant Return the Samples Compatibility Patch"
	landing
	invisible
	to offer
		has "Remnant: Return the Samples 2: done"
		not "event: remnant: return the samples timer"
	on offer
		event "remnant: return the samples timer" 2
		fail


# "This mission is intended to serve as a notification that one timer has elapsed and how long to wait until the missions start again."
mission "Remnant: Return the Samples 3 Exploration Hint"
	landing
	source "Aventine"
	to offer
		has "event: remnant: return the samples timer"
	on offer
		event "remnant: wait for plume" 7 14
		conversation
			`As you disembark from <ship> you almost run into Plume as he strides across the landing area. "Captain <first>, I didn't see you there!" You glance back at the bulk of your ship that you just stepped out of and look at him curiously, wondering how he could have missed seeing a spaceship land in front of him. His chant takes on a slightly apologetic tone. "I've been lost in thought thinking about everything we have discovered lately, especially the most recent recordings you made. I still have a lot to analyze, though." He pauses, looking thoughtful. "That being said, I will probably have more work for you in a week or two."`
			`	Plume asks a few more questions about what you have been doing, then politely excuses himself to continue his research. "Please let me know if you uncover anything else about Nenia!" he trills to you as he departs.`
				decline



event "remnant: wait for plume"



mission "Remnant: Salvage 1"
	name "Remnant History Updates"
	description `The Remnant are interested in learning about what has happened in human space since they left. Find a copy of human history on <destination>.`
	minor
	source "Viminal"
	destination "Alexandria"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		random < 50
		or
			has "Remnant: Catalytic Ramscoop: done"
			has "Remnant: Plasma Cannon: done"
			has "Remnant: Heavy Laser: done"
			has "Remnant: Tech Retrieval: done"
	on offer
		conversation
			`As you step out into the icy chill of Viminal, you get a message from Taely, the engineering prefect, asking if you could meet her in the cafeteria.`
			choice
				`	(Not right now.)`
					defer
				`	(Accept her invitation.)`
			`	Replying that you can, you make your way through the crowds and find an empty table. Moments later Taely appears and grabs two trays from the dispenser before heading towards you. She settles down in the opposite chair with a look of exhaustion.`
			`	"It is good to see you again, <first>," she sings softly. When you sign a reply she sits up, smiles, and switches to sign. "My, you are a quick learner. This is much faster." Her quick gestures are hard to follow, but the language videos seem to have focused on a practical vocabulary that has most of the words she uses.`
			`	"I haven't fully..." (She makes a sign that you don't understand, but seems similar to the signs for "break" and "understand".) "...the technology you retrieved for us, but we are learning much from what we have already found. Could you help us catch up with what has happened in ancestral space since our Exodus?"`
			choice
				`	"Yes. What can I do to help?"`
				`	"Sorry, not interested."`
					decline
			branch library
				has "Human Cultural Archives: done"
			`	"Excellent! According to a friend of mine who is versed in history from the war, there were rumors that a grand library was being built in the Deep to house all of human knowledge. If it exists, that would likely be where to go."`
				accept
			label library
			`	"Excellent! According to a friend of mine who is versed in history from the war, there were rumors that a grand library was being built in the Deep to house all of human knowledge. If it exists..." She stops when she notices you nodding with a knowing expression. "You have already been there? Well, you certainly get around, Captain <last>. I suppose that makes things rather straight forward."`
				accept
	on visit
		dialog
			`The station has a small museum gift shop that sells a copy of the entire archive on a data card. It only costs 40 credits, but because you have done a horrible job at managing your finances you do not have even that much cash on hand right now.`
			`	Go earn some money, then return here.`
	on complete
		payment -40



mission "Remnant: Salvage 1B"
	name "Remnant History Updates"
	description `Return the copy of human history to <destination>.`
	landing
	source "Alexandria"
	destination "Viminal"
	to offer
		has "Remnant: Salvage 1: done"
	on offer
		conversation
			`After having traveled clear across the galaxy, you finally have arrived at the archives of human history. On the direction of the librarians you locate the gift shop and buy a "souvenir copy" of the archive. You idly wonder if you should buy a couple spare copies just in case, but decide against it.`
				accept



mission "Remnant: Salvage 2"
	landing
	name "Defend <planet>"
	description "Assist in defending <planet> from a Korath raid, then return to the planet."
	source "Viminal"
	to offer
		has "Remnant: Salvage 1B: done"
	on offer
		conversation
			`Having acquired a copy of the archive, you gently set your ship down on Viminal hoping that this information is helpful. The port seems unusually busy, but the comm channels are quiet beyond the bare minimum to keep traffic organized.`
			`	Before you have even taken the time to shut down the engines Taely is halfway up the side of your ship securing a refueling hose and charging cable. As you reach for the commlink she scrambles up to the bridge windows and quickly rattles off a series of signs at you. All you can make out is "Keep it hot, incoming!" Before you can frame a reply she has raced across your wing and leapt to the Albatross parked next to you.`
			`	Looking around more carefully, you note that every ship in the port is idling with fuel lines still connected. If this were some Republic port the safety inspectors would be having a nightmare. One Starling is getting holes in its wings patched even as the crew appear to be running prep-for-flight checklists. It also looks like every ship has a guard. Something tells you that right now would be a bad time to take a walk around town.`
			`	After some tense minutes of waiting, the planetary defense sirens start and the idling ships begin to ascend one by one. You quickly figure out where you are in the launch sequence and follow the stream of craft heading for orbit.`
				launch
	npc
		government "Remnant"
		personality staying uninterested disables plunders
		fleet "Large Remnant" 2
	npc evade
		government "Korath"
		personality heroic plunders harvests target
		fleet "Korath Ember Waste Raid" 7
		fleet
			names "korath"
			cargo 3
			variant
				"Korath World-Ship B (Ember)"
	on visit
		dialog "There are still Korath raiders circling overhead. You should take off and help the Remnant ships to fight them."
	on complete
		payment 1000000
		conversation
			`As some ships maintain orbital sentry positions, most ships return to their berths. Mechanics are soon swarming over the ships, and what you suppose are ambulances are waiting at the ramps to collect the injured. Farther back, flatbed tractor units wait to pick up any salvage that has been collected.`
			`	Eventually a tired but pleased-looking prefect stops by your ship. He starts chanting, "Do you understand our language, or do I need to sing?" He looks relieved when you reply that you can understand most of what is said so long as he signs slowly. "Thank you for your assistance during the raid. The sensors you placed in Parca picked up the fleet coming in and gave us sufficient warning to get everyone ready."`
			`	He is silent for a moment, with the air of someone who is enjoying not having to run for the first time in a while. "Oh, Taely said that you might have some historical records for us?" You hand over the copy of the archive in response, telling him that it is probably the best available. He hands you a credit chip with <payment> on it. "Thank you, I'll make sure this gets where it needs to go. In the meantime, we could use your help in the spaceport."`



mission "Remnant: Salvage 3"
	name "Transport injured Remnant"
	description `Some injured Remnant need to be transported away from the front lines to Aventine.`
	source "Viminal"
	passengers 8
	cargo "medical gear" 5
	blocked "A prefect informs you that they need to evacuate some injured to a hospital on Aventine, but you will need 8 free bunks and 5 tons of cargo space in order to handle the injured."
	stopover Aventine
	to offer
		has "Remnant: Salvage 2: done"
	on offer
		conversation
			`After watching the mechanics start repairs on the <ship>, you make the short trek to the spaceport common area. People are still rushing around as ships continue to land. No wrecks so far, and judging by the scrolling arrivals displays there are still quite a few ships on approach. Looking around for someone to talk to, you spot the prefect who had just visited your ship. He notices you and comes over. "No ships lost yet," he signs harshly, "but there are a few ships that haven't checked in."`
			`	He shakes his head and continues, "We need to keep our medical facilities as free as possible. Could you take some of our injured to Aventine? They are stable and healthy enough for an unattended transport, and it would free up medics and space here."`
			choice
				`	"Of course."`
				`	"I'd rather not."`
					decline
			`	He looks relieved. "Thanks. I was going to have to divert one of our sentries to take them." He pauses and consults his commlink. "The medical team will have the injured settled onboard shortly, along with everything they need to ensure they arrive safely. They will probably have some fresh crew to send back with you."`
				accept
	on stopover
		dialog
			`The injured crew made for an eerily quiet jaunt from Viminal to Aventine. They didn't sing, and rarely signed. Some spent the trip mellowed out on powerful painkillers, while the few that left their rooms seem to be mostly intent on doing prescribed stretches and movements to help damaged muscles heal. A few are interested in visiting with someone from outside the Ember Waste, but they lacked the energy to do so for long.`
			`	On Aventine there are ambulances and medical staff waiting to transport the injured to longer-term medical facilities. As they depart, a fresh crew arrives to take their places.`
	on visit
		dialog phrase "generic cargo and passenger on visit"
	on complete
		payment 100000
		set "license: Remnant Capital"
		conversation
			`When you return to Viminal, the Remnant crew members leave your ship and disperse across the tarmac to the ships they have been assigned to, each one of them signing their thanks as they leave. A few minutes after they leave your commlink beeps, notifying you that a message from the prefect has arrived:`
			`	"Captain <last>! Thank you for your help in defending Viminal and transporting those wounded. I have transferred a small token of our gratitude to you. That being said, perhaps you would appreciate this a bit more: the other prefects and I have agreed to grant you access to a wider range of ships. Our capital class ships will now be available to you, including the Albatross and the Pelican. At the rate these raids are going, it is in everyone's best interests that you have access to a better warship. Please, meet us in the spaceport to further discuss the situation."`



mission "Remnant: Salvage 4"
	name "Track down the <npc>"
	description "Track down and disable a Korath ship that escaped the raid on Viminal so that the Remnant may salvage it for technology."
	source "Viminal"
	to offer
		has "Remnant: Salvage 3: done"
	on offer
		conversation
			`Walking into the cafeteria you immediately sense the buoyant mood. According to a report on the video screen, very few Remnant ships were actually lost. Furthermore, of the ships that were lost, the escape pods worked perfectly, ensuring none of the crew were killed. Groups of crew are gathered around tables intermingled with the ground teams that keep their ships operational, and based on the snippets you can catch, they seem to be trading stories of crack shots and clever improvisations.`
			`	Taely sits over at a corner booth with the prefect who met you at the dock and a couple other mechanics, and she waves you over. "Captain <last>! So, how do you like fighting with our fleet?" asks one of the mechanics.`
			choice
				`	"It seems odd to have a planetary defense fleet plundering."`
				`	"It was a tough battle."`
					goto next
	
			`	"I suppose it would," chants one of them. "We need access to their tech, though. Otherwise we'll fall behind." Judging by the finality of his statement, this is held to be common knowledge among the Remnant.`
				goto next
	
			label next
			`	While you're conversing with the group, the prefect suddenly glances down at his commlink, reads a message, then looks up at you. "It appears that a Korath ship survived the raid and has destroyed a few ships without taking cargo. Could you deal with it?"`
			choice
				`	"Sure."`
				`	"Sorry, I don't have time to help you out."`
					decline

			`	"Thank you," he signs. "It is acting oddly, jumping around destroying ships instead of looting and running. If it simply looted and left we would be pleased, but now it is learning about us instead, so it has reached the end of its usefulness. Please disable it so that we can salvage parts from it." He pauses, then continues, "I doubt we'll be able to salvage the ship itself - they pack those things with soldiers - but we should be able to strip everything else of use off it."`
				accept
	npc save disable
		government "Korath"
		personality heroic vindictive target uninterested waiting marked
		system
			distance 1 2
		fleet
			names "korath"
			cargo 3
			variant
				"Korath Raider (Hyperdrive)"
		dialog "You have disabled the Korath ship that was left over from the raid on <planet>. You can now return there to collect your payment."
	on fail
		payment 350000
		dialog `You are met by a prefect who looks upset. "The ship was supposed to be disabled so its contents could be salvaged!" he signs angrily. Nonetheless, he shoves a credit chip worth <payment> into your hand. "That's half what you would have earned if the ship had been disabled." He pauses and shakes his head. "I think Taely might have some more work for you in the spaceport, but in the meantime, why don't you go find some Korath to practice disabling? It is a valuable skill among the Remnant."`
	on complete
		payment 700000
		dialog `You are met by a prefect who thanks you for disabling it and hands you a credit chip for <payment>. "I think Taely might have some more work for you in the spaceport, but in the meantime, don't forget to drop off any salvaged outfits in the outfitters so the researchers can look at them."`



mission "Remnant: Salvage 5"
	name "Salvage Delivery"
	description `Deliver <cargo> to Caelian.`
	source "Viminal"
	cargo "Korath salvage" 20
	blocked `Taely would like you to deliver some valuable Korath equipment to Caelian, but you will need 20 tons of space to carry it.`
	destination "Caelian"
	to offer
		or
			has "Remnant: Salvage 4: done"
			has "Remnant: Salvage 4: failed"
	on offer
		conversation
			`As you stroll across the tarmac under the great dome you spot Taely heading your way with a flatbed tractor filled with components in tow.`
			`	"<first>! I'm glad I ran into you. The last raid gave us some particularly good pieces of equipment to study. Could you take these to the weapons laboratory on Caelian?"`
			choice
				`	"I could do that."`
				`	"I'm not interested."`
					decline
			`	Taely quickly helps load the cargo onboard your ship. It doesn't appear to be actual whole items anymore, but rather pieces thereof. "They will be expecting you, but you might have to pry them out of their lab to get some help unloading. They can be a bit single-minded when they have something interesting to work on."`
				accept
	
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 150000
		dialog `On Caelian, you are able to find the appropriate research warehouse just off the main landing pad. After a few minutes, a lab technician disentangles herself from a project and brings a wagon and camel team out to the ship to unload the salvage. It strikes you as a bit incongruous that a lab technician is using a graviton repulsion lifter to load cargo from your ship into a wagon pulled by a camel. "If you can, I should have some things to send back to Taely if you could meet me in the cafeteria this afternoon."`



mission "Remnant: Salvage 6"
	name "Transport outfits to Taely"
	description `Deliver <cargo> to Viminal.`
	source "Caelian"
	cargo "ship parts" 20
	blocked `The technician you delivered Taely's salvaged parts to would like you to take some finished parts back to Taely, but you will need 20 tons of space to do so.`
	destination "Viminal"
	to offer
		has "Remnant: Salvage 5: done"
	on offer
		event "remnant salvage available"
		conversation
			`You spot the laboratory technician entering the cafeteria, and she approaches you.`
			`	"Thank you for waiting. I have a shipment of parts ready for Taely, and with the recent increase in attacks she needs them sooner rather than later. Please take them to her."`
			`	Outside you find a camel pulling a wagon filled with ship parts to be loaded on board the <ship>.`
				accept
		
	on visit
		dialog phrase "generic cargo on visit"
	on complete
		payment 150000
		conversation 
			`Taely meets you at the dock with a flatbed ready to offload the shipment. As you run through your shutdown routine you hit the switch for the cargo bay doors, and by the time you have gone down to the hold, Taely has half the shipment already unloaded.`
			`	Her signs flick at you with a gentleness that you are slowly deciding equates to a cheerful tone. "Thank you for all the help you've provided in recovering this salvage," she says as she hands you <payment>. "I have discussed it with the other engineers, and we have decided to give you access to our salvage."`
			`	She leads you over to the warehouse, scans her ID on the console, and taps a few commands. Then she scans your ID card. "There you go, I have updated your access codes," she signs cheerfully. She hands you your ID and pulls you to a door on the far side of the outfitting shop. Beyond the door is a vast room filled with outfits and weapons that clearly don't fit the same style as the other Remnant technology. You have seen most of the things here on scans and when salvaging equipment from other ships, but never up close.`
			`	"This section of our warehouse is the salvage area. Everything in here, we have collected in sufficient quantities that it is available for general use." She nods at a rack of Korath Heat Shunts while she explains, then turns back to you.`
			`	"Of course the really advanced and rare stuff is still going to the labs first, and won't be available until we have learned all we can from it." She looks around proudly. "We don't have the industrial capacity or the number of researchers to keep up with the Alphas, the Korath, or whoever else might be out there. But we are very good at figuring out what others have built and learning from it.`
			`	"Any salvage or unrecognized technology gets scanned in our quarantine area for threats, then looked over to figure out if there is anything new in it. If there is, it is shipped to a lab for our researchers to dissect. Anything we have already figured out ends up in here, where a select few captains are welcome to use it as they see fit."`
			choice
				`	"Threats?"`
					goto threats
				`	"Interesting."`
			`	"Yes, it is, isn't it? So many new things out there to discover and learn about.`
				goto end
			label threats
			`	"Yes, sometimes salvage that is brought in is dangerous. System Cores come with fleets of micro-bots, for instance. If they aren't de-activated properly, they keep trying to rebuild their surroundings in the form of the last ship they were configured to serve. And while it hasn't happened yet, we are worried that someday we might run into someone who builds traps into their equipment, or uses nanobots that have run amok. We haven't seen any of that yet, but our science-fiction stories are filled with tales of nanotech apocalypses and things like that.`
			label end
			`	"Well, I need to get back to work. That last battle put us behind schedule on our repairs. Have a good day!" With a final flourish that you think is the equivalent of an exclamation mark, Taely strides out of the outfitters, heading towards another landing bay.`

event "remnant salvage available"
	planet "Aventine"
		outfitter "Remnant Salvage"
	planet "Caelian"
		outfitter "Remnant Salvage"
	planet "Viminal"
		outfitter "Remnant Salvage"



mission "Remnant: Bounty 2"
	job
	repeat
	name "Remnant bounty"
	description "Hunt down a Korath ship that is lurking in Remnant territory, then return to <planet> to receive your payment of <payment>."
	source
		government "Remnant"
	to offer
		has "Remnant: Salvage 4: offered"
		random < 60
	npc kill
		government "Korath"
		personality heroic vindictive target uninterested waiting marked
		system
			distance 1 2
		fleet
			names "korath"
			cargo 3
			variant
				"Korath Raider (Hyperdrive)"
		dialog "You have destroyed the Korath ship. You can now return to <planet> to collect your payment."
	on visit
		dialog phrase "generic bounty hunting on visit"
	on complete
		payment 400000
		dialog "A Remnant military leader thanks you for hunting down the Korath ship <npc>, and gives you the agreed-upon payment of <payment>."



mission "Remnant: Expanded Horizons Quarg 1"
	name "Visiting the Quarg"
	description "Take Remnant researchers to <destination> to see the Quarg."
	minor
	source
		government "Remnant"
	passengers 3
	destination "Wayfarer"
	to offer
		has "Remnant: Learn Sign Follow Up: offered"
		has "Remnant: Salvage 2: done"
		has "First Contact: Quarg: offered"
		random < 40
	on offer
		conversation
			`As you relax in the cafeteria on <origin> you are approached by a young Remnant. Judging by the hand-held sensors and tools hanging off her belt, you suppose she is a researcher or an engineer.`
			`	"Hello Captain <last>. My name is Dawn, and I have been spending the past few days skimming the archive you retrieved. I wanted to ask you a few questions. May I?"`
			`	She slides into the chair opposite you without waiting for your reply, and pulls out a data pad. "Firstly, our histories mention how humanity met a race called the 'Quarg' and had some ongoing dialogs with them, but not much beyond that. Now here in this history that you brought us, it says that humanity has started exchanging technology with them! Is this true?" She looks at you intently. You sign negatively, and she dejectedly continues. "Could you explain about them, then?" You reply that the Quarg have allowed humanity to live near them, and that the Quarg are usually willing to answer questions, including scientific ones. You continue, elaborating that while the Quarg don't seem to mind having an innovative shipyard studying them as best it can, they don't actually share their technology with anyone.`
			`	After several hours of telling her about meeting the Quarg and visiting their worlds, it finally occurs to you that it would be easy enough to take her to visit the Tarazed system.`
			choice
				`	(Offer to take her there.)`
				`	(Don't offer.)`
					decline
			`	 You offer to take her and a couple of her colleagues to see the Quarg. She eagerly accepts, although she expresses a preference for landing on the human world, so they can observe the Quarg ships from a distance, as they would rather not draw any attention to themselves. She runs out of the cafeteria after telling you they will meet you at your ship in half an hour.`
				accept
	on visit
		dialog `You land on <planet>, but realize that you left Dawn and her colleagues on one of your escorts that hasn't entered the system. Better depart and wait for it to arrive.`
	on complete
		log "People" "Dawn" `Dawn is a young Remnant researcher with a strong interest in engineering. She has yet to pick a specialty, but appears to have a talent for exo-engineering.`
		conversation
			`Dawn and her colleagues are thrilled with the trip. While they had each served on Remnant ships exploring the Ember Waste or patrolling their territory, none had ever been more than a handful of jumps away from their own space. They explain that their ships were always cautious to stay far away from human space to avoid leading anyone back.`
			`	It occurs to you that Dawn and her colleagues seem much less reserved than most Remnant. You aren't sure if it is because they are younger, less secretive, or if the Remnant have been holding back from you. It is also possible that you just have better opportunities to figure it out now that you can understand their signs.`
			`	Upon arriving at Wayfarer they spend considerable amount of time watching the few Quarg in evidence, however it is easy to see that the real draw of their attention is the ships. You wave your ID across the scanner for the shipyard and take them inside to see what Tarazed Shipyards has on display.`
			branch rich
				"net worth" >= 20000000
			`	After a few minutes a sales agent meanders over to ask if there's anything he can do to help. You ask a few questions about the different ships for Dawn's benefit, listen to the sales agent repeat a few lines from the display, then politely tell him you'll just browse on your own.`
				goto end
			label rich
			`	Almost before you are in the main hall a sales manager is at your side, inquiring as to how he can help. You can almost see the credit signs in his eyes and you suspect that scanning your license may have done a quick check of your net worth too.`
			`	You ask a few leading questions about new designs and play the part of a captain with more money than brains, and the manager eagerly directs you to the large hangars near the end that house their largest and fanciest ships. After it becomes clear that he doesn't have any experience flying them you politely disentangle yourselves from him to look at the ships in peace.`
			label end
			`	After an hour of browsing, the young Remnant agree to meet you back at the spaceport in an hour and take off to the outfitters.`



mission "Remnant: Expanded Horizons Quarg 2"
	name "Quarg Scanning"
	description "Perform an outfit scan on the Quarg ship <npc>, then land again on <destination>."
	source "Wayfarer"
	to offer
		has "Remnant: Expanded Horizons Quarg 1: done"	
	on offer
		conversation
			`Dawn and her fellow researchers show up a few minutes after you do, excitedly talking about the various things they have seen. "<first>, there is a Quarg ship taking off shortly, and we were hoping you might be able to get scans of it while it is in flight. It would be really helpful for our understanding of how they work."`
				accept

	on accept
		log "Volunteered to show Dawn and some of her fellow researchers the world where humans and Quarg co-exist."
	
	npc "scan outfits"
		government "Quarg"
		personality staying uninterested target launching
		fleet "Quarg"
		dialog
			`Dawn and her compatriots eagerly pore over the readouts as they come in, then ask if you could land again to compare their scans to ones taken on the ground.`

	on visit
		dialog `You've landed on <planet>, but you haven't yet scanned the <npc>'s. Depart and use an outfit scanner to scan the ship.`
	on complete
		conversation
			`The Remnant researcher's attention to detail is impressive. They carefully quantify every aspect of the scans, including notes about the ship's behaviors. By the time you are on the ground again, they have amassed quite a collection of data crystals filled with analysis. You note that they are careful to ensure everything they collect is backed up in multiple places, including what appears to be a small lead lined box.`
			`	Dawn does some follow-up scans of idle Quarg ships, and her fellow researchers take some time to make sure all their pictures are crisp and detailed. They let you know that they will meet you back in the spaceport bar once they are done.`



mission "Remnant: Expanded Horizons Quarg 3"
	name "Expanded Horizons Return"
	description "Return the Remnant researchers to <planet>."
	source "Wayfarer"
	passengers 3
	blocked `This mission requires bunks for three passengers.`
	destination
		government "Remnant"
	to offer
		has "Remnant: Expanded Horizons Quarg 2: done"
	on offer
		conversation
			`Back in the spaceport bar you wait around for a couple hours. Just when you were about to go find them, the trio walk in looking like they had spent all day on the move, but otherwise unreadable.`
			`	"Okay, I think we are ready to go. Can you take us to <planet>?"`
				accept
	on visit
		dialog `You land on <planet>, but realize that you left Dawn and her colleagues on one of your escorts that hasn't entered the system. Better depart and wait for it to arrive.`
	on complete
		payment 150000
		conversation
			`Once you are back in the privacy of the <ship>, the stony reserve fades to cheerfulness as the trio are a blur of motion, chattering back and forth with their signs. Apparently this will be one of the biggest boosts to their research since the first time they salvaged the gear off a Korath raider.`
			`	They eventually slow down their signs a bit and explain that up until the time the Remnant departed from ancestral space, human scanners had been unable to penetrate the outer layers of Quarg ships. One of Dawn's fellow researchers continues with the explanation.`
			`	"Our historical records just have a few pictures and videos of Quarg ships, along with a basic scan that doesn't provide more than the general outline of the ship. These scans," he says while tapping the databanks, "actually picked up detailed structural layouts and even identified a number of key components. It isn't nearly enough information to be able to duplicate them, but it is enough that we can start trying to figure out how they work."`
			`	Upon arriving at <planet> they quickly thank you, hand you <payment>, and run back to their offices to finish prepping their material to publish and distribute.`



phrase "broken jump drive on visit"
	word
		`You've landed on <planet>, but you don't have a broken jump drive to give to the Remnant. You may need to steal one from Korath Raiders found through Remnant jobs, or depart and wait for an escort carrying one to enter the system.`

mission "Remnant: Broken Jump Drive 1"
	name "Broken Jump Drive Delivery"
	description "You have been asked to deliver a broken jump drive to the researchers on <planet>."
	minor
	landing
	repeat
	to offer
		has "remnant blood test pure"
		not "Remnant: Broken Jump Drive 1: active"
		not "Remnant: Broken Jump Drive 1: done"
	source
		government "Remnant"
		attributes outfitter
	destination
		government "Remnant"
		attributes outfitter
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			branch repeated
				has "Remnant: Broken Jump Drive 1: offered"
			`As the <ship> settles onto its designated landing pad, you see someone emerge from the nearby outfitter and quickly make their way to you. The man waits a safe distance before approaching once you cycle the hatch and disembark. "Greetings, Captain <last>," trills the Remnant, "we saw the news that the newcomer among us was tracking down an erratic Korath ship. When you came in to land, we saw on the scans that you salvaged its malfunctioning jump drive. Could we take it to study?"`
			choice
				`	"Maybe later."`
					goto refuse
				`	"That would be a good use for it."`
					goto accept
			
			label repeated
			`You have a broken jump drive that the Remnant might be interested in. Do you want to seek out someone to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`	You find a Remnant director and inform them about the broken jump drive that you have.`
			
			label accept
			`	"Excellent!" he glances at his data pad. "There are several teams working on aspects of the jump drive, and the team with the highest priority for this one is on <planet>. I will notify them to expect you."`
				accept
			label refuse
			`	He considers this, and sings, "If you wish. Our offer stands, whenever you choose to return."`
				decline
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		conversation
			`When you arrive on <planet> there is a team of engineers and mechanics waiting for you, along with a flatbed freight truck. Once you open the cargo doors they quickly free the broken jump drive from its moorings and load it delicately onto their truck. The lead engineer comes over to hand you <payment>. "Thank you for salvaging this. I suspect my compatriot who spoke to you never mentioned this, but we have a fund set aside for rewarding captains who bring in rare pieces of alien technology. If you find any more of these drives, there is sure to be a research team somewhere that is willing to reward you for it."`
			choice
				`	"I will keep a lookout for more."`
					goto end
				`	"Aren't you going to replace it with a hyperdrive?"`
			`	The engineer looks at you incredulously. "You mean you were actually trying to use this drive?" He shakes his head in disbelief. "You are lucky you managed to get this far, then. It is surprising that they exist at all, so it is too much to expect them to work too. If you need a replacement drive, there are plenty available in the outfitter.`
			label end
			`	"Next time you find one of these drives, just check with a starport director. They will know where it will need to go. A word of warning though; I strongly recommend not trying to use these drives - they may disappear at the most inconvenient of times, and there won't always be an outfitter on hand." He turns and heads off with the rest of the team, turning briefly to give you friendly wave as they disembark.`



mission "Remnant: Broken Jump Drive 2"
	name "Broken Jump Drive Delivery"
	description "The researchers on <planet> have requested your broken jump drive."
	to offer
		has "Remnant: Broken Jump Drive 1: done"
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			`You've plundered another broken jump drive. Do you want to seek out a director to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`	Information must flow quickly amongst the Remnant, because by the time you arrive at the director's desk she already has the information ready for you.`
			`	"Greetings, newcomer," she chants. "Are you interested in turning in the broken jump drive you salvaged to our researchers?"`
			`	You nod.`
			`	"They will definitely appreciate new material to research. The team is located on <planet>. I will send a notification ahead so they will be expecting you."`
				accept
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		conversation
			`As promised, there is a team of researchers waiting when you settle onto the designated landing pad. One comes over to hand you <payment> while the rest carefully unload the broken drive and start hauling it back to their lab.`
			`	"Our thanks, Captain <last>. Having the remains of a drive like this will be very beneficial to our efforts." His voice cracks a bit, as if unused to being used much.`
			choice
				`	"Great! I will find more."`
					goto end
				`	"What are you studying?"`
			`	"Our previous research into jump drives determined that these drives are unsurprisingly multi-part systems. We know the outer part that we can see and handle is mostly the machinery for generating some kind of containment field or pocket. As to how it works or why it is needed..." his chant trails off and he makes a gesture you suspect may be the equivalent of a shrug. "Anyway, our team is focused on the nature of this outer system. It is our hope that, damaged as it is, its continued existence might allow us to look a little farther inside its inner workings to figure out exactly what that field does and how it is used.`
			label end
			`	"Well, my compatriots finished unloading rather quickly, so I should be off. For all our sakes, I hope you find more of these for us."`



mission "Remnant: Broken Jump Drive 3"
	name "Broken Jump Drive Delivery"
	description "The researchers on <planet> need a broken jump drive for testing."
	to offer
		has "Remnant: Broken Jump Drive 2: done"
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			`You've plundered another broken jump drive. Do you want to seek out a director to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`	As you approach the director in the spaceport concourse, he looks up and waves at you. "Good timing, Captain <first>," he sings. "We have a team of researchers on <planet> who have requested a broken jump drive. Could you deliver one to them?"`
			`	"I can," you respond.`
			`	"Excellent. The recent discovery of these broken drives has spurred discussion and excitement in various quarters. We have had teams researching jump drives for at least a century now without a lot of success. I'm told they are rather intricate, but your finds are opening new avenues of investigation. That being said, I'll notify the team on <planet> to expect you."`
				accept
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		conversation
			`The team waiting for you on <planet> is definitely eager to begin. You barely have the hatch open before they are chivying their camel-pulled wagon up the ramp. They load the broken jump drive surprisingly quickly despite their delicate movements.`
			`	"This is an exciting day, Captain <first>! Countless theories may be proven or put back into the fires of refinement based on the testing we can do with this!"`
			choice
				`	"Great! I will find more."`
					goto end
				`	"Any theories of note?"`
			`	He looks thoughtful for a moment, then warbles, "As you may know, standard hyperdrives work by generating a fusion reaction and folding it into the fabric of space/time, and these folds naturally fall along the known hyperlanes. I suppose one could view those lanes as the 'crease lines' of the universe. My favorite theory is that jump drives have some additional machinery to guide the fold. That way they can dictate where the fold occurs instead of just aligning with the nearest crease. Given their increased fuel draw, it makes sense that it would take more fuel to generate a fresh fold than to re-use an existing crease.`
			label end
			`	"Oh, before I forget..." he hands you <payment>. "Off to start setting up the tests." He sings half to himself as he trundles off after the wagon.`



mission "Remnant: Broken Jump Drive 4"
	name "Broken Jump Drive Delivery"
	description "You have been asked to deliver a broken jump drive to the researchers on <planet>."
	to offer
		has "Remnant: Broken Jump Drive 3: done"
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			`You've plundered another broken jump drive. Do you want to seek out a director to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`You head over to the director's desk to see who is in need of the next broken jump drive. The director smiles at you, looks over several messages on her screen, then clears her throat.`
			`	"Your finds are very much in demand," she sings. "Could you bring this one to a team working on <planet>?"`
			`	You nod in response.`
			`	"Thank you. We are looking forward to seeing what comes from this."`
				accept
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		conversation
			`As you approach your designated pad, you spot a team of researchers with unloading equipment hustling out of a nearby entrance. Once you have completed your shutdown sequence they quickly set to work unloading the drive. Once the task is complete, they pause for a moment to hand you <payment>. "Thanks for finding this," they sing in unison. "Our labs are eager to begin work on your most recent find, Captain <first>. Our thanks!"`
			choice
				`	"Good luck with that."`
					goto end
				`	"How is your research going?"`
			`	"Good, and about to get better," they sing. "We are working on various aspects of a theory that the jump drive actually disregards traditional jumping entirely, and uses the folding mechanism to put the ship itself into a pocket, while somehow triggering an opening to said pocket in the target system." One of them continues, "If this is true, it could be fairly dangerous to try activating these anywhere close to fragile things like cities or mountains, which is why they put our lab on the far side of the planet from all such things.`
			label end
			`	"Well, we have a bit of a trip to get to our lab, but it should be exciting once we get there. Fare well!" With that, they head off towards a large vehicle nearby.`



mission "Remnant: Broken Jump Drive 5"
	name "Broken Jump Drive Delivery"
	description "A team of engineers on <planet> would like a broken jump drive to study."
	to offer
		has "Remnant: Broken Jump Drive 4: done"
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not distance 0
	on offer
		require "Jump Drive (Broken)"
		conversation
			`You've plundered another broken jump drive. Do you want to seek out a director to give it to?`
			choice
				`	(Maybe later.)`
					defer
				`	(Yes.)`
			`	You stop by the director's desk to report having salvaged another broken jump drive for one of their research teams. The director nods in appreciation and checks his list. "There is a new team starting a project on <planet>. Could you take it there please?"`
			`	"Sure," you respond.`
			`	"Much appreciated. The sooner they get it, the sooner they can start on their project. That being said, I have spoken with the other directors, and we have decided that we are getting so many requests that we will put these into the job board for you. Any time the landing scans detect one of these broken jump drives, the system will display a message on the job board listing where the next one needs to be delivered."`
				accept
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		event "remnant research update bjd1" 100 200
		"reputation: Remnant" ++
		conversation
			`The landing pad on <planet> is tucked away just behind the spaceport. A handful of engineers have a conveyor belt already set up to offload the drive from your ship when you arrive. When you open the hatch they extend it right up the ramp, and quickly load the drive onto it. The machinery quickly whisks the drive into a nearby structure along with its escort. A couple of the engineers stop by to talk with you and hand you <payment>.`
			`	"Thanks for bringing us this drive. It is a rare piece of technology for us to get our hands on."`
			choice
				`	"I will leave you to it."`
					goto end
				`	"What are you studying?"`
			`	With a pleased expression they break into song about mining the deeps for the mysteries of the sky. As best you can tell, they are trying to figure out the materials that the drive is made with, followed by experiments to replicate those materials.`
			label end
			`	"Our experiments await. May your search be fruitful!" they trill as they head off.`



event "remnant research update bjd1"



mission "Remnant: Broken Jump Drive job"
	name "Broken Jump Drive Delivery"
	description "The researchers on <planet> need another broken jump drive to continue their project."
	job
	repeat 4
	to offer
		has "Remnant: Broken Jump Drive 5: done"
	source
		government "Remnant"
	destination
		government "Remnant"
		attributes outfitter
		not distance 0
	on visit
		dialog phrase "broken jump drive on visit"
	on complete
		outfit "Jump Drive (Broken)" -1
		"remnant: broken jump drive count" ++
		payment 300000
		"reputation: Remnant" ++
		"Remnant: Broken Jump Drive job: offered" --
		dialog "The research team quickly offloads the broken jump drive and pays you <payment> before hurrying back to their lab."



mission "Remnant: Face to Maw 1"
	name "Talk to Plume about the void sprites"
	description "Plume would be very interested in a report on what happened with the void sprites."
	landing
	to offer
		has "event: remnant: return the samples timer"
	source
		system "Nenia"
	destination "Aventine"
	on offer
		conversation
			`As the swirls of gas close over the <ship> you wonder idly what brought you back here. This time, there is no apologetic researcher asking you to risk your life for research, or to return eggs from where they were stolen. You catch a glimpse of the Archon materializing above the clouds as it decloaks, letting you know that you're being watched, but saying nothing; for now, it is nothing more than a silent, brooding presence in the skies of Nenia. The silent depths of an alien world fold over you, gradually erasing the rest of the galaxy from sight.`
			`	As the <ship> levels off at the designated altitude, you strap yourself into a pressure suit. Stepping into the airlock, you grimace at the antiquity of these "hard-shell" shield systems, and lower the shields so that you can exit onto the hull. Out on the surface, you admire the misty kaleidoscope of colors filtering down through the cloud layers, playing over distant shapes moving in the mists.`
			`	Before long several void sprites emerge, weaving and dancing among the clouds. They swirl for a few minutes around your cargo bay doors as if waiting for something, then pulse briefly with flickers of light and drop into the clouds below. Another void sprite flutters around the <ship>, poking at the hull and sliding over it with its tentacles. You quickly think to turn on your video recorder to catch the scene. The void sprite notices your brief movement, and turns towards you with a lunge. As it closes on you, your attention is drawn to what you suspect is its mouth: a zig-zagging crack that peels open like a zipper to reveal an opening that resembles an industrial grinder.`
			`	Up close, the void sprite is massive. Most of its tentacles are easily as thick as your leg, and move with surprising speed and precision. It shifts through the air like a strange deep-sea fish in water. You can make out a low vibration you suspect is from the air whistling over the void sprite as it closes with you. As the giant creature rapidly approaches, you can feel a heavy paralysis weigh down on you. Suddenly, you recall that your shields are keyed to your equipment; you could activate them to protect yourself and they would extend around you. It probably wouldn't be too healthy for the void sprite, though.`
			choice
				`	(Activate the shields.)`
				`	(Do not activate the shields.)`
					goto holdground
			`	You push against the paralysis and trigger the shields in a rush. The millisecond that follows feels like an eternity. The void sprite is just a few meters away, one tendril reaches out and touches you just as the shield slams into place. The tendril becomes caught on both sides of the shield, cleaving it in two. In the same instant, the pressure on your mind vanishes as if it was simply a dream. You momentarily stare at the immobile void sprite, frozen in shock over what just happened. Then time reasserts itself and the sprite spasms away from the ship with an unearthly crescendo of dissonant tones. It plunges down into the clouds, leaving you standing on your hull with the floating severed piece of tendril.`
			`	You carefully scoop up the tendril in a container and seal it. While the attack spoiled the beautiful moment, at least you have a sample and some recordings that might be of interest to Plume.`
				flee
			label holdground
			`	The feeling of paralysis leaves your body as the void sprite is only a few meters away, but you resolve yourself to face down the creature without triggering your shields. Time seems to slow down as the sprite rushes up to you and its leading tentacle reaches out to touch you. As you brace for an impact you realize that the sprite has managed to bring itself to a complete stop and the tentacle has telescoped in on itself slightly. You can see that it is touching you, but you didn't even feel the impact. You and the void sprite stand frozen for a moment, and the force trying to paralyze you snaps off, replaced by a feeling of weightlessness. Moments later the void sprite pulls back and pulses skyward with an unearthly fountain of sounds, spiraling around the <ship> before disappearing into the swirling clouds.`
			`	As you re-enter the ship, you notice that your suit is covered in some kind of translucent slime. You scrape off as much as you can into a sealed container, but your pressure suit appears to be permanently stained an iridescent purplish color as a result. You resolve to go find Plume, since he will almost certainly find this interesting.`
				accept
	on accept
		fail "Remnant: Face to Maw 1B"
	on complete
		conversation
			`When you walk into Plume's lab on Aventine you find him buried in some kind of holographic projection of your egg returning mission. You can see that he appears to be watching the video in slow-motion as he taps out notes on his data pad. After a few minutes he looks up and sees you standing in the entryway. He quickly pulls himself out of the projection and hits what you assume must be the pause button.`
			`	"Captain <first>! What a pleasant surprise," he trills. "If you are looking for more work, I don't have anything for you right now."`
			`	You tell Plume about how you visited Nenia and had an interesting encounter with a void sprite, and offer him the recording and container of slime. He eagerly accepts the data chip and the container from you. Sliding the container into some kind of machine, it immediately starts to whir as he slots the data chip into his console. Moments later his holographic projection shifts to the new footage. He checks the timestamps, then chants, "These will take me a little while to analyze. I will meet you in the spaceport in a few hours to discuss my preliminary findings."`



mission "Remnant: Face to Maw 1B"
	name "Talk to Plume about the void sprites"
	description "Plume would be very interested in a report on what happened with the void sprites."
	landing
	to offer
		has "event: remnant: return the samples timer"
	to fail
		or
			has "Remnant: Face to Maw 1: done"
			has "Remnant: Face to Maw 1: active"
	to complete
		has "Remnant: Face to Maw 1: declined"
	source
		system "Nenia"
	destination "Aventine"
	on complete
		conversation
			`When you walk into Plume's lab on Aventine you find him buried in some kind of holographic projection of your egg returning mission. You can see that he appears to be watching the video in slow-motion as he taps out notes on his data pad. After a few minutes he looks up and sees you standing in the entryway. He quickly pulls himself out of the projection and hits what you assume must be the pause button.`
			`	"Captain <first>! What a pleasant surprise," he trills. "If you are looking for more work, I don't have anything for you right now."`
			`	You tell Plume about how you visited Nenia and had a threatening encounter with a void sprite, and offer him the recording and container with the tentacle. Plume recoils from you in disgust. "After all our work rebuilding trust with the Archon and the void sprites, you go and risk it for... what, exactly? Sightseeing? Thrill of the hunt?" His chant settles into an angry tone. "Leave the recording on the console. I want no part of that tentacle, though."`
			`	As you are leaving Plume's lab a technician pulls you aside. "Our records mention that the tentacles had some interesting properties that were useful in combat. If you are interested, meet me in the spaceport in a few hours."`



mission "Remnant: Face to Maw 2"
	name "Take the slime sample to Viminal"
	description "The void sprite slime has properties of interest to a team of engineers on <planet>."
	to offer
		has "Remnant: Face to Maw 1: done"
	source "Aventine"
	destination "Viminal"
	cargo "slime sample" 1
	on offer
		conversation
			`When Plume finally arrives you can tell from his step that he is excited. He slides onto the bench opposite to you and pulls out a data pad. "I admire your bravery, Captain. I don't think I would have had the courage to hold my ground against a void sprite like that," he chants respectfully, then changes tone to one of wonder. "In that last moment it almost looked like it was sizing you up or examining you." He shakes his head with an amused expression. "I spend so much time studying non-human creatures I sometimes slip and start anthropomorphizing them." His voice takes on a more militant cadence. "That was probably some kind of territorial display, or possibly some kind of dominance challenge. We don't know enough about void sprite behavior to speculate further, though.`
			`	"Be that as it may be, the more immediate reward for your curiosity is in this sample," he trills with excitement. "Several of our labs on Viminal have been working on the development of a new generation of ship technology, and this substance contains some chemicals that could be a key component. I have already transmitted the data to them, but they would like to compare with the original. Could you take this sample to them?"`
			choice
				`	"Yes, I can."`
					accept
				`	"I would rather not."`
			`	Plume stoically accepts that with a nod. "That is your choice. I will arrange for another ship to transport it."`
				decline
	on accept
		event "remnant: penguin"
	on complete
		log "People" "Taely" `One of Taely's main priorities is improving the maneuverability characteristics of Remnant Ships. To this end she has been working on building a new prototype ship based on the void sprites.`
		"remnant met taely" ++
		payment 1000000
		conversation
			branch taely
				"remnant met taely" > 1
			`When you land on Viminal a solidly built female Remnant in coveralls is waiting for you. "Greetings, Captain <first>. My name is Taely, and I am a Prefect among the Remnant. Above all else, I study motion, and in particular how our starships move."`
				goto main
			label taely
			`	When you land on Viminal you spot Taely waiting for you. "Greetings, Captain <first>. It is good to see you again."`
			label main
			`	She makes a gesture you are starting to recognize as a sign of curiosity. "So, Plume sent us some very interesting data, along with a message to expect you with a sample?" You hand her the container with the slime sample and she holds it up to the light. "Interesting looking substance," she chants. "Let's go back to my workshop."`
			choice
				`	"Okay, let's go."`
					goto follow
				`	"Could I catch up with you in a minute?"`
			`	"Sure, just don't take too long. My project has reached its final stage."`
			`	You take your time to get to the workshop, admiring the view along the way. When you finally arrive at the workshop you can hear strange noises coming from inside, accompanied by the smell of a thunderstorm in a swamp. You step into the workshop and come to a stop to stare at the thing in front of you.`
				goto skip
			label follow
			`	She leads the way through several side passages to an out-of-the-way landing pad connected to a large hangar. Inside, you can see a giant tank filled with a murky fluid, surrounded by equipment and displays. She makes her way over to a large machine with several slots which she slides the container into.`
			`	As the machine starts to work, she turns back to you. "As the primary example of space-faring life, the void sprites have always been of interest to me. They have numerous advantages that we as atmosphere-bound creatures can only dream of, such as being able to experience space in a much more direct manner. I have been working on a side project to build a new generation of ships that melds these ideas with our current technology, but the data we have on the void sprites is centuries old and incomplete." Her chant trails off as she pulls up a display with your original scans on them. "However, your recent explorations provided new data I could use to update my designs. This slime that you retrieved is the final ingredient."`
			choice
				`	"So my data is helping to develop new technology?"`
				`	"That's good. Any chance of a bonus for me?"`
			`	The machine dings, and she looks over the results and then trills excitedly. "Yes, it matches! So it is time to begin the final activation." She strides over to a central console and taps in a series of commands, followed by an iris scan and a blood prick. The industrial hum of the room suddenly ramps up to a crescendo as your nose is assaulted by what you can only describe as the smell of a thunderstorm in a swamp. A few seconds later the noise softens, and the tank starts lowering into the floor as a shape emerges from the liquid.`
			label skip
			`	The ship before you has some faint traces of the gascraft you have flown to Nenia, along with other elements of Remnant design, but it is clearly something new. Its antennae swivel around, as if taking in its environment, and the tentacles along the side twitch and reach out to touch its surroundings. Solidly built tendrils underneath it flex as it lifts itself off its supports and begins to move around. You have a momentary vision of what this ship might look like in the skies of Nenia.`
			scene "scene/penguinscene"
			`	Taely's droning chant of technical details finally seeps through your reverie: "... So from a captain's point of view flying the penguin should be very similar to a normal ship, except she flies herself and doesn't need a crew to run her systems." She pauses, and looks at you. "Your curiosity provided the final ingredients to bring her to life. You should be the first to have one. You'll still have to go through the shipyard to register her and pay the resource cost to balance the logistics, but this first one is reserved for you." She pats the nose of the Penguin and it makes a whooshing noise. After a moment she starts going over the ship with a scanner, leaving you to contemplate in silence.`

event "remnant: penguin"
	shipyard "Remnant Gascraft"
		"Penguin"



mission "Remnant: Face to Maw 2B"
	name "Take the tentacle to Chilia's engineers on Caelian"
	description "The tentacle has properties that may be put to use by the engineers on <planet>."
	to offer
		has "Remnant: Face to Maw 1B: done"
	source "Aventine"
	destination "Caelian"
	cargo "tentacle" 1
	on offer
		conversation
			`When the technician arrives in the spaceport he immediately strides over to you. "I checked the records, and my memory was correct. One of our research teams centuries ago discovered that these tentacles could be used as a devastating weapon in close quarters combat."`
			`	He pulls out an image of a strange-looking rifle and continues to chant, "The personal weapons lab under Prefect Chilia has a few of the old weapon frames. If you go visit it on Aventine, they could turn this tentacle into a potent weapon for you."`
			choice
				`	"That sounds good."`
					accept
				`	"I would rather not."`
			`	The technician looks disappointed. "Oh well, enjoy your trophy."`
				decline
	on complete
		log "People" "Chilia" `As a military prefect, Chilia is responsible for the defense of Remnant space. He can usually be found on the front lines of combat unless required to work on tactics for the Remnant as a whole.`
		payment 250000
		"remnant chilia" ++
		outfit "Void Rifle"
		conversation
			branch chilia
				"remnant chilia" > 1
			`You follow the directions provided to you and eventually find yourself at a Remnant weapons lab. You enter and are met by security, who asks you to wait. A few minutes later a fit young man emerges from another door. "Greetings, Captain <first>," he sings. "I am Prefect Chilia. I have the nominal responsibility for the overall defense of Remnant space and military operations." He smiles depreciatingly. "I say 'nominal' as virtually all our activities are militaristic in some way, but usually fall under the purview of those who better understand them."`
				goto main
			label chilia
			`You follow the directions provided to you and eventually find yourself at a Remnant weapons lab. You enter and are met by security, who asks you to wait. A few minutes later a fit young man emerges from another door. "Greetings, captain <first>," he sings. "We meet once again." You immediately recognize the voice as being the man who convinced you to provide the blood sample and get to know the Remnant. "We didn't get a proper introduction last time, but you have probably figured out that I have the nominal responsibility for the overall defense of Remnant space and military operations." He smiles depreciatingly, "I say 'nominal' as virtually all our activities are military in some way, but usually fall under the purview of those who better understand them."`
			label main
			`	He leads you to a room that looks like an armory where a team of technicians is putting the finishing touches on a rifle stock. "The request from the technician on your behalf caught my attention, as we haven't had the key resources for making void rifles in centuries. Fortunately, we haven't really needed them since we resolved the threats that originally plagued our settlements.`
			choice
				`	"It's called a void rifle?"`
				`	"I don't need details."`
					goto end
			`	"Yes, void rifle. I don't know who discovered it, but someone figured out that if a particularly high charge was poured through the tentacle's nervous system in a specific pattern, it emits a paralyzing cone of energy with a reasonably decent range. I'm neither an engineer or a biologist, so I do not really understand the mechanics of it." He pauses to watch as a technician installs the now-caged tentacle on top of the stock. "Suffice it to say, it is useless for sniping, but its ability to shoot through walls and affect areas makes it excellent for sweeping ships and building-to-building clearing operations.`
			label end
			`	"All right, enough history." He turns to the technicians who are finishing the assembly. "The tentacle has been treated to resist decay and the stock mechanisms will provide basic maintenance routines for as long as you charge it regularly." He strides over, picks up the completed void rifle, and then hands it to you. "You are holding a piece of our history, Captain. Use it well!"`
			scene "outfit/void rifle"
